Introduction
An RT-11 program asks the monitor for a service with emt (vector 30), after setting up the arguments. The assembler macros (.EXIT, .PRINT, .READW …) expand to those instructions, and the
tables below are read from the macros themselves: the RT-11 V4.0 system macro library SYSMAC.SML on the RT-11 disk image that ships with the PDP-11 emulator on this site. There are four forms:
- an
emtwith a number of 340 to 357, one request each (the argument is in R0 or on the stack); - an
emtbelow 340 with the channel number in its low four bits, the older form of the file requests: the request is the number with those four bits cleared; emt 374: R0 holds code × 0400 + channel;emt 375: R0 points to an argument block whose first word holds code × 0400 + channel.
The disassembly names the request under each emt: for 374 and 375 from the mov #n,r0 shortly before it and, for 375, the first word of the block at that address.
A request set up another way is shown by its form only.
EMT 340 to 357
| EMT | Request |
|---|---|
340 | .TTYIN / .TTINR |
341 | .TTYOUT / .TTOUTR |
342 | .DSTATUS |
343 | .FETCH / .RELEAS |
344 | .CSIGEN |
345 | .CSISPC / .GTLIN |
346 | .LOCK |
347 | .UNLOCK |
350 | .EXIT |
351 | |
352 | .SRESET |
353 | .QSET |
354 | .SETTOP |
355 | .RCTRLO |
357 | .HRESET |
EMT 356 does not occur in the V4.0 macro library read; the EMT numbers 360 to 373 are reserved for the monitor (a note in a summary of the programmed requests: not checked in the library). The EMT numbers 260 to 337 are not requests of the library either.
The channel forms (EMT below 340)
| EMT | Request |
|---|---|
000–017 | .DELETE (channel in the low four bits) |
020–037 | .LOOKUP |
040–057 | .ENTER |
100–117 | .RENAME |
120–137 | .SAVESTATUS |
140–157 | .REOPEN |
160–177 | .CLOSE |
200–217 | .READ (and .READW, .READC: the area number is the channel) |
220–237 | .WRITE (and .WRITW, .WRITC) |
240–257 | .WAIT |
EMT 374: the code in R0
| Code (decimal) | Request |
|---|---|
| 0 | .WAIT |
| 1 | .SPND |
| 2 | .RSUM |
| 3 | .PURGE |
| 4 | .SERR |
| 5 | .HERR |
| 6 | .CLOSE |
| 7 | .TLOCK |
| 8 | .CHAIN |
| 9 | .MWAIT |
| 10 | .DATE |
EMT 375: the code in the argument block
The code is the high byte of the first word of the block R0 points to; the low byte is the channel, or, for the codes 25, 30 and 31, which of several requests it is (second table).
| Code (decimal) | Request |
|---|---|
| 0 | .DELETE |
| 1 | .LOOKUP |
| 2 | .ENTER |
| 3 | .TRPSET |
| 4 | .RENAME |
| 5 | .SAVESTATUS |
| 6 | .REOPEN |
| 8 | .READ / .READC / .READW |
| 9 | .WRITE / .WRITC / .WRITW |
| 11 | .CHCOPY |
| 12 | .DEVICE |
| 13 | .CDFN |
| 16 | .GTJB |
| 17 | .GTIM |
| 18 | .MRKT |
| 19 | .CMKT |
| 20 | .TWAIT |
| 21 | .SDAT / .SDATC / .SDATW |
| 22 | .RCVD / .RCVDC / .RCVDW |
| 23 | .CSTAT |
| 24 | .SFPA |
| 25 | .PROTECT / .UNPROTECT |
| 26 | .SPFUN |
| 27 | .CNTXSW |
| 28 | .GVAL |
| 29 | .SCCA |
| 30 | .CRRG / .ELRG / .CRAW / .ELAW / .MAP / .UNMAP / .GMCX |
| 31 | .MTSET / .MTGET / .MTIN / .MTOUT / .MTRCTO / .MTATCH / .MTDTCH / .MTPRNT / .MTSTAT |
| 32 | .SDTTM |
| 33 | .SPCPS |
| Code | Low byte 0, 1, 2 … |
|---|---|
| 25 | .PROTECT, .UNPROTECT |
| 30 | .CRRG, .ELRG, .CRAW, .ELAW, .MAP, .UNMAP, .GMCX |
| 31 | .MTSET, .MTGET, .MTIN, .MTOUT, .MTRCTO, .MTATCH, .MTDTCH, .MTPRNT, .MTSTAT |
The codes 7, 10, 14 and 15 do not occur in the library read.
Not described
Known, not yet covered
- What each request does, its arguments and its errors (the explorer names the request only); the extended-memory and multi-terminal requests of later versions, and EMT 356.
Unknown
- Whether the numbers 360 to 373 are used by the monitor: taken from a summary, not from the library.
Links
Reference
- .SAV overview – the program format and its zero page
- EMT – the instruction