c
Example:
Example:
XCTB - Create Task Block
If 00=0 then: (A2)=Task entry address
If data register DO.W is negative, then registers AO and Al specify the new task's memory limits. Register A2 points to the new task command line. (If A2=0, then the monitor is invoked.) The command line is transferred to the spawned program via a system message buffer. The maximum length of a com-mand line is 64 characters. When the task is scheduled for the [rrst time, the mes-sage buffers are searched for a command. Mesmes-sages with a source task equal to
$FF are considered commands and moved to the task's monitor buffer. The task
eLi
then processes the line. If no command message is found, then the monitor is called directly.If 00=<0 then: (A2)=Task command line
Data register Dl.W specifies the new task's priority. The range is from 1 to 255.
The larger the number, the higher the priority.
Dl=Task priority
Data register D2.W specifies the
I/O
port to be used by the new task. If register D2.W is positive, then the port is available for both input and output. If register D2.W is negative, then the port is used only for output. If register D2.W is zero, then no port is assigned. Only one task may be assigned to anyone input port while many tasks may be assigned to an output port. Hence, a port is allocated for input only if it is available. An invalid port assignment does not result in an error. A call is made to D$INT in the debugger module. This initializes all ad-dresses, registers, breaks, and offsets. Finally, the spawned task's number is returned in register DOL to the parent task. This can be used later to test task status or to kill the task.POOS ASSEMBLY PRIMITIVES REFERENCE 3.3-10/87 35
XCTB - Create Task Block
36
Possible Errors:
D2=I/Oport
If 02=0, then phantom port (no I/O) If 02>0, then port is used for I/O If 02<0, then port is used for output only
If you specify the address as a fIle parameter, the system does not check to see if the memory is already allocated to another task. Use caution or it may crash your system.
72
=
Too Many Tasks 73 = Not Enough Memory3.3-10/87 PDOS ASSEMBLY PRIMITIVES REFERENCE
c
o
C": ~ .)
."-o
o
",(
Delay Set/Clear Event
$A032 MPOOSKI XDEV
<status error return>
In DO.L = Time
Dl.B = Logical Event (+=Set(1), -=Clear(O)) IT DO.L=O, then the D l.B event is removed from the delay list.
The DELAY SET/CLEAR EVENT primitive places a logical timed event in a system delay list controlled by the system clock. Data register DO.L specifies the time interval in clock tics. When it counts to zero, then the event Dl.B is set if positive, or cleared if negative. If the event already exists in the delay list, it is replaced by the new entry. IT the time specified in DO equals zero, then the event equal to Dl.B is removed from the delay list ITDl.B is positive,~vent D1.B is fIrSt cleared. IT D I.B is negative, event D I.B is set before placing the event in the delay list and exiting the primitive.
XSEF - Set Event Flag With Swap XSEV - Set Event Flag
XSUI - Suspend Until Interrupt XTEF - Test Event Flag
XDPE - Delay on Physical Event 83 = Delay Queue Full
PDOS ASSEMBLY PRIMITIVES REFERENCE 3.3-10/87 37
XDFL
<status error return>
In DO.W
=
# of contiguous sectors (AI)=
File nameThe DEFINE FILE primitive creates a new file entry in a POOS disk directory, specified by address register AI. A POOS file name consists of an alphabetic character followed by up to 7 additional characters. An optional 3 character ex-tension can be added if preceded by a colon. Likewise, the directory level and disk number are optionally specified by a semicolon and slash respectively. The file name is terminated with a null.
The filename convention is as follows where upper and lower case are unique.:
APPPPPPP:PPP;NNN/NNN
# --Auto-create flag may prefix filename A -- Alpha characters A-Z or a-z
P -- Printable characters except ":", ";", "f'. The "." character may be used, but will conflict with the monitor command separator unless the filename is enclosed within parentheses
N -- Number in the range of 0-255
Data register DO contains the number of sectors to be initially allocated at file definition. If register DO is nonzero, then a contiguous file is created with DO sectors. Otherwise, the value stored in the SYRAM variable "FECT." + 1 is used to defme the number of sectors that will be allocated. Each sector of alloca-tion corresponds to 252 bytes of data. A contiguous fIle facilitates random ac-cess to fIle data since POOS can directly position to any byte within the fIle without having to follow sector links. A contiguous file is automatically changed to a non-contiguous fIle if it is extended with non-contiguous sectors.
If the register DO is non-zero, then the EOF pointer will be set to point at the end of the last allocated sector; otherwise, the EOF pointer will point at the begin-ning of the fIrst allocated sector.
50
=
Bad File Name3.3-10/87 PDOS ASSEMBLY PRIMITIVES REFERENCE
C · .""".'" ·1
('
Example:
FN
(
c c
PDOS ASSEMBLY PRIMITIVES REFERENCE