RT11 PDP11 EMT system calls =========================== EMT MACRO Function ------------------------------------------------------------------------------------- &E0 o340 224 .TTYIN Read one character from TTY, Cy=1 if no char pending &E1 o341 225 .TTYOUT Write one character to TTY, Cy=1 if no space in output buffer &E2 o342 226 .DSTATUS Read status of device &E3 o343 227 .FETCH Load device handler, check if available &E4 o344 228 .CSIGEN Call Command String Interpreter in general mode &E5 o345 229 .CSISPC Call Command String Interpreter in special mode &E5 o345 229 .GTLIN Read input line &E6 o346 230 .LOCK Lock USR in core, make USR resident &E7 o347 231 .UNLOCK Unlock USR in core, release USR ------------------------------------------------------------------------------------- &E8 o350 232 .EXIT Exit &E9 o351 233 .DPRINT Insert run-time message &E9 o351 233 .PRINT Print zero-terminated message at R0 &EA o352 234 .SRESET Reset all channels &EB o353 235 .QSET Increase size of monitor I/O queue &EC o354 236 .SETTOP Set top of memory for user program &ED o355 237 .RCTRLO Restart terminal output after CTRL/O &EE o356 238 unused &EF o357 239 .HRESET Terminate I/O and do .SRESET ------------------------------------------------------------------------------------- &F0 o360 240 .SETFQB RSTS only: Set FIRQB &F1 o361 241 .SATTIM RSTS only: Convert date/time to string &F2 o362 242 .SETCC RSTS only: Set CTRL-C trap &F3 o363 243 .DORUN RSTS only: Transfer control to an RT11 program &F4 o364 244 .ERRPRT RSTS only: Print error message &F5 o365 245 .DOFSS RSTS only: Parse filename &F6 o366 246 .GETCOR RSTS only: Expand job image &F7 o367 247 .DOCCL RSTS only: Parse for RSTS command ------------------------------------------------------------------------------------- &F8 o370 248 .CLRFQB RSTS only: Clear FIRQB &F9 o371 249 .CLRXRB RSTS only: Clear XRB &FA o372 250 &FB o373 251 .CALLK Call in Kernel mode ------------------------------------------------------------------------------------- &FC o374 252 R0=function:channel &00 o00 0 .WAIT Wait for I/O to complete on channel &01 o01 1 .SPND Suspend current job &02 o02 2 .RSUM Resume mainline code after .SPND &03 o03 3 .PURGE Purge/clear a channel &04 o04 4 .SERR Inhibit fatal errors &05 o05 5 .HERR Terminate job on fatal error &06 o06 6 .CLOSE Close channel &07 o07 7 .TLOCK Test USR lock state &08 o10 8 .CHAIN Chain to another program &09 o11 9 .MWAIT MJ: Wait for messages to be processed &0A o12 10 .DATE Read date to R0 &0B o13 11 .ABTIO Abort I/O &0C o14 12 &0D o15 13 &0E o16 14 &0F o17 15 &1D o35 28 .SCCA Causes an entered Ctrl-Z to be passed to program ------------------------------------------------------------------------------------- &FD o375 253 R0=>argument block, [R0]=function:subfunction &00 o00 0 .DELETE Delete file &01 o01 1 .LOOKUP Open existing file and message channel &02 o02 2 .ENTER Create new file for output &03 o03 3 .TRPSET Claim traps at o0004 and o0010 &04 o04 4 .RENAME Rename file &05 o05 5 .SAVESTATUS Save open file status, release channel &06 o06 6 .REOPEN Restore from .SAVESTATUS and reopen channel &07 o07 7 .CLOSE &08 o10 8 .READ Read data from channel to memory &09 o11 9 .WRITE Write data from memory to channel &0A o12 10 .WAIT &0B o13 11 .CHCOPY MJ: Enable access to other job's channel &0C o14 12 .DEVICE Enable device interupts &0D o15 13 .CDFN Define channels &0E o16 14 &0F o17 15 &10 o20 16 .GTJB Read current job parameters &11 o21 17 .GTIM Read time of day &12 o22 18 .MRKT Mark time &13 o23 19 .CMKT Cancel unexpired timer request &14 o24 20 .TWAIT Suspend for specied time &15 o25 21 .SDAT MJ: Send message/data &16 o26 22 .RCVD MJ: Receive message/data &17 o27 23 .CSTAT Read status of channel &18 o30 24 .SFPA Set handler for floating-point processor errors &19 o31 25 .PROTECT Protect 0-476 exclusive to current job &19 o31 25 .UNPROTECT Cancel .PROTECT &1A o32 26 .SPFUN Special device functions &1B o33 27 .CNTXSW MJ: Request context switch &1C o34 28 .PEEK Read memory location &1C o34 28 .POKE Write memory location &1C o34 28 .GVAL Read monitor value &1C o34 28 .PVAL Set monitor setting &1D o35 29 .SCCA Enable CTRL/C &1E o36 30 .CRAW MJ: Create window in virtual memory &1E o36 30 .CRRG MJ: Create window in extended memory &1E o36 30 .ELAW MJ: Eliminate window in virtual memory &1E o36 30 .ELRG MJ: Eliminate window in extended memory &1E o36 30 .GMCX MJ: Return mapping status of specified window &1E o36 30 .MAP MJ: Map a virtual window to extended memory &1E o36 30 .UNMAP MJ: Unmap virtual address window &1F o37 31 .MTATCH Attach exclusive terminal &1F o37 31 .MTDTCH Detach exclusive terminal &1F o37 31 .MTGET Read terminal status &1F o37 31 .MTIN Multiterminal .TTYON request &1F o37 31 .MTOUT Multiterminal .TTYOUT request &1F o37 31 .MTPRNT Multiterminal .PRINT request &1F o37 31 .MTRCTO Multiterminal .RCTRLO request &1F o37 31 .MTSET Modify terminal status &1F o37 31 .MTSTAT Read terminal status &20 o40 32 .SDTTM Set system date/time &21 o41 33 .SPCPS Change flow control of mainline code &22 o42 34 .SFDAT Set file creation date from R0 &23 o43 35 .FPROT Set file protection &24 o44 36 .GFDAT Read file creation date to R0 &24 o44 36 .GFINF Read word from directory entry to R0 &24 o44 36 .GFSTA Read file status to R0 &24 o44 36 .SFINF Set directory info from R0 &24 o44 36 .SFSTAT Set file status from R0 &25 o45 37 .CLOSZ Close channel opened by .ENTER and set file size &26 o46 38 .CMAP MJ: Control I/D space and mapping &26 o46 38 .GCMAP MJ: Return CMAP status &26 o46 38 .MSDS MJ: Control user/data space &27 o47 39 ------------------------------------------------------------------------------------- &FE o376 &FE reserved, used internally by monitor &FF o377 &FF reserved, returns immediately - RSTS call and RSTS prefix ------------------------------------------------------------------------------------- Version 1 RT11 passes function:channel in EMT 8-bit number with 4-bit function and 4-bit channel. Reimplemented as EMT o374 with R0=function:channel as 16-bit number with 8-bit function and 8-bit channel. EMT call number b4-b7 = function b0-b3 = channel/subfunction EMT Function ------------------------------------------------------------------------------------- 0x Delete 1x Lookup 2x Enter 3x unused 4x Rename 5x SaveStatus 6x Reopen 7x Close 8x Read 9x Write Ax Wait Bx unused Cx unused Dx unused Ex I/O functions Fx reserved for internal RT11 use