1626
|
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
2 ; syscall
|
|
3 ;
|
|
4 ; $Id$
|
|
5 ;
|
|
6 ; Edt/Rev YYYY/MM/DD Modified by
|
|
7 ; Comment
|
|
8 ; ------------------------------------------------------------------
|
|
9 ; 2004/07/02 Boisy G. Pitre
|
|
10 ; Started
|
|
11
|
|
12 .title NitrOS-9 System Definitions
|
|
13
|
|
14 .area SYS (ABS)
|
|
15
|
|
16 .ifndef Level
|
|
17 Level == 2
|
|
18 .endif
|
|
19
|
|
20 ; Common definitions
|
|
21 true == 1
|
|
22 false == 0
|
|
23
|
|
24 .page
|
|
25 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
26 ; System Service Request Code Definitions
|
|
27 ;
|
|
28 .org 0
|
|
29 F$Link:: .rmb 1 ; Link to Module
|
|
30 F$Load:: .rmb 1 ; Load Module from File
|
|
31 F$UnLink:: .rmb 1 ; Unlink Module
|
|
32 F$Fork:: .rmb 1 ; Start New Process
|
|
33 F$Wait:: .rmb 1 ; Wait for Child Process to Die
|
|
34 F$Chain:: .rmb 1 ; Chain Process to New Module
|
|
35 F$Exit:: .rmb 1 ; Terminate Process
|
|
36 F$Mem:: .rmb 1 ; Set Memory Size
|
|
37 F$Send:: .rmb 1 ; Send Signal to Process
|
|
38 F$Icpt:: .rmb 1 ; Set Signal Intercept
|
|
39 F$Sleep:: .rmb 1 ; Suspend Process
|
|
40 F$SSpd:: .rmb 1 ; Suspend Process
|
|
41 F$ID:: .rmb 1 ; Return Process ID
|
|
42 F$SPrior:: .rmb 1 ; Set Process Priority
|
|
43 F$SSWI:: .rmb 1 ; Set Software Interrupt
|
|
44 F$PErr:: .rmb 1 ; Print Error
|
|
45 F$PrsNam:: .rmb 1 ; Parse Pathlist Name
|
|
46 F$CmpNam:: .rmb 1 ; Compare Two Names
|
|
47 F$SchBit:: .rmb 1 ; Search Bit Map
|
|
48 F$AllBit:: .rmb 1 ; Allocate in Bit Map
|
|
49 F$DelBit:: .rmb 1 ; Deallocate in Bit Map
|
|
50 F$Time:: .rmb 1 ; Get Current Time
|
|
51 F$STime:: .rmb 1 ; Set Current Time
|
|
52 F$CRC:: .rmb 1 ; Generate CRC
|
|
53
|
|
54 .ifgt Level-1
|
|
55
|
|
56 ; NitrOS-9 Level 2 system calls
|
|
57 F$GPrDsc:: .rmb 1 ; Get Process Descriptor copy
|
|
58 F$GBlkMp:: .rmb 1 ; Get System Block Map copy
|
|
59 F$GModDr:: .rmb 1 ; Get Module Directory copy
|
|
60 F$CpyMem:: .rmb 1 ; Copy External Memory
|
|
61 F$SUser:: .rmb 1 ; Set User ID number
|
|
62 F$UnLoad:: .rmb 1 ; Unlink Module by name
|
|
63 F$Alarm:: .rmb 1 ; Color Computer 3 Alarm Call
|
|
64 .rmb 2 ; Reserved - For overlap of other systems
|
|
65 F$NMLink:: .rmb 1 ; Color Computer 3 Non-Mapping Link
|
|
66 F$NMLoad:: .rmb 1 ; Color Computer 3 Non-Mapping Load
|
|
67 .org 0h25
|
|
68 F$TPS:: .rmb 1 ; Return System's Ticks Per Second
|
|
69 F$TimAlm:: .rmb 1 ; CoCo individual process alarm call
|
|
70
|
|
71 .endif
|
|
72
|
|
73 .org 0h27 ; Beginning of System Reserved Calls
|
|
74 F$VIRQ:: .rmb 1 ; Install/Delete Virtual IRQ
|
|
75 F$SRqMem:: .rmb 1 ; System Memory Request
|
|
76 F$SRtMem:: .rmb 1 ; System Memory Return
|
|
77 F$IRQ:: .rmb 1 ; Enter IRQ Polling Table
|
|
78 F$IOQu:: .rmb 1 ; Enter I/O Queue
|
|
79 F$AProc:: .rmb 1 ; Enter Active Process Queue
|
|
80 F$NProc:: .rmb 1 ; Start Next Process
|
|
81 F$VModul:: .rmb 1 ; Validate Module
|
|
82 F$Find64:: .rmb 1 ; Find Process/Path Descriptor
|
|
83 F$All64:: .rmb 1 ; Allocate Process/Path Descriptor
|
|
84 F$Ret64:: .rmb 1 ; Return Process/Path Descriptor
|
|
85 F$SSvc:: .rmb 1 ; Service Request Table Initialization
|
|
86 F$IODel:: .rmb 1 ; Delete I/O Module
|
|
87
|
|
88 .ifgt Level-1
|
|
89
|
|
90 F$SLink:: .rmb 1 ; System Link
|
|
91 F$Boot:: .rmb 1 ; Bootstrap System
|
|
92 F$BtMem:: .rmb 1 ; Bootstrap Memory Request
|
|
93 F$GProcP:: .rmb 1 ; Get Process ptr
|
|
94 F$Move:: .rmb 1 ; Move Data (low bound first)
|
|
95 F$AllRAM:: .rmb 1 ; Allocate RAM blocks
|
|
96 F$AllImg:: .rmb 1 ; Allocate Image RAM blocks
|
|
97 F$DelImg:: .rmb 1 ; Deallocate Image RAM blocks
|
|
98 F$SetImg:: .rmb 1 ; Set Process DAT Image
|
|
99 F$FreeLB:: .rmb 1 ; Get Free Low Block
|
|
100 F$FreeHB:: .rmb 1 ; Get Free High Block
|
|
101 F$AllTsk:: .rmb 1 ; Allocate Process Task number
|
|
102 F$DelTsk:: .rmb 1 ; Deallocate Process Task number
|
|
103 F$SetTsk:: .rmb 1 ; Set Process Task DAT registers
|
|
104 F$ResTsk:: .rmb 1 ; Reserve Task number
|
|
105 F$RelTsk:: .rmb 1 ; Release Task number
|
|
106 F$DATLog:: .rmb 1 ; Convert DAT Block/Offset to Logical
|
|
107 F$DATTmp:: .rmb 1 ; Make temporary DAT image (Obsolete)
|
|
108 F$LDAXY:: .rmb 1 ; Load A [X,[Y]]
|
|
109 F$LDAXYP:: .rmb 1 ; Load A [X+,[Y]]
|
|
110 F$LDDDXY:: .rmb 1 ; Load D [D+X,[Y]]
|
|
111 F$LDABX:: .rmb 1 ; Load A from 0,X in task B
|
|
112 F$STABX:: .rmb 1 ; Store A at 0,X in task B
|
|
113 F$AllPrc:: .rmb 1 ; Allocate Process Descriptor
|
|
114 F$DelPrc:: .rmb 1 ; Deallocate Process Descriptor
|
|
115 F$ELink:: .rmb 1 ; Link using Module Directory Entry
|
|
116 F$FModul:: .rmb 1 ; Find Module Directory Entry
|
|
117 F$MapBlk:: .rmb 1 ; Map Specific Block
|
|
118 F$ClrBlk:: .rmb 1 ; Clear Specific Block
|
|
119 F$DelRAM:: .rmb 1 ; Deallocate RAM blocks
|
|
120 F$GCMDir:: .rmb 1 ; Pack module directory
|
|
121 F$AlHRAM:: .rmb 1 ; Allocate HIGH RAM Blocks
|
|
122
|
|
123 ; Alan DeKok additions
|
|
124 ; F$ReBoot is unimplemented at this time
|
|
125 F$ReBoot:: .rmb 1 ; Reboot machine (reload OS9Boot) or drop to RSDOS
|
|
126 F$CRCMod:: .rmb 1 ; CRC mode, toggle or report current status
|
|
127 F$XTime:: .rmb 1 ; Get Extended time packet from RTC (fractions of second)
|
|
128 F$VBlock:: .rmb 1 ; Verify modules in a block of memory, add to module directory
|
|
129
|
|
130 .endif
|
|
131
|
|
132 ;
|
|
133 ; Numbers $70 through $7F are reserved for user definitions
|
|
134 ;
|
|
135 .org 0h70
|
|
136
|
|
137 .if Level=1
|
|
138
|
|
139 .rmb 16 ; Reserved for user definition
|
|
140
|
|
141 .else
|
|
142
|
|
143 F$RegDmp:: .rmb 1 ; Ron Lammardo's debugging register dump
|
|
144 F$NVRAM:: .rmb 1 ; Non Volatile RAM (RTC battery backed static) read/write
|
|
145
|
|
146 .rmb 0h80-. ; Reserved for user definitions
|
|
147
|
|
148 .endif
|
|
149
|
|
150 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
151 ; I/O Service Request Code Definitions
|
|
152 ;
|
|
153 .org 0h80
|
|
154 I$Attach:: .rmb 1 ; Attach I/O Device
|
|
155 I$Detach:: .rmb 1 ; Detach I/O Device
|
|
156 I$Dup:: .rmb 1 ; Duplicate Path
|
|
157 I$Create:: .rmb 1 ; Create New File
|
|
158 I$Open:: .rmb 1 ; Open Existing File
|
|
159 I$MakDir:: .rmb 1 ; Make Directory File
|
|
160 I$ChgDir:: .rmb 1 ; Change Default Directory
|
|
161 I$Delete:: .rmb 1 ; Delete File
|
|
162 I$Seek:: .rmb 1 ; Change Current Position
|
|
163 I$Read:: .rmb 1 ; Read Data
|
|
164 I$Write:: .rmb 1 ; Write Data
|
|
165 I$ReadLn:: .rmb 1 ; Read Line of ASCII Data
|
|
166 I$WritLn:: .rmb 1 ; Write Line of ASCII Data
|
|
167 I$GetStt:: .rmb 1 ; Get Path Status
|
|
168 I$SetStt:: .rmb 1 ; Set Path Status
|
|
169 I$Close:: .rmb 1 ; Close Path
|
|
170 I$DeletX:: .rmb 1 ; Delete from current exec dir
|