9 ! Expects on stack: monitor call number
11 ! Implemented are the following monitor calls:
18 ! If called with a number of a call that is not implemented,
19 ! a trap is generated.
22 pop ix ! returnaddress
24 pop hl ! monitor call number
27 jp z,monexit ! is it an exit?
29 jp z,monread ! is it a read?
31 jp z,monwrite ! is it a write?
33 jp z,monopen ! is it an open?
35 jp z,monclose ! is it a close?
44 pop hl ! file-descriptor, not used
45 pop hl ! hl = pointer to output buffer
46 pop de ! de = number of bytes to be read
47 ld bc,0 ! bc will contain the number of bytes actually read
53 call putchar ! echo character
59 cp 0x0A ! is it a newline?
67 pop hl ! file-descriptor, not used
68 pop hl ! hl = pointer to output buffer
69 pop de ! de = number of bytes
85 pop hl ! pointer to string
88 push hl ! push file descriptor
89 push hl ! push error code twice
94 ex (sp),hl ! pop file descriptor and push error code
95 pop hl ! file descriptor
97 push hl ! push error code twice
102 pop hl ! file descriptor
105 ex (sp),hl ! remove argp and push error code