Register state when entering PDP-11 code ======================================== +====+=========================+===========================+=======================+ | | Unix | RSX | RT11 | +====+=========================+===========================+=======================+ | R0 | 0 | transfer address | start block of file | +----+----- ---+----------- ----+-----------------------+ | R1 | 0 | task name | RMON stack, <0x0100 | +----+---- (R0 OR R1 OR ---+----------- (R0 OR R1 OR +-----------------------+ | R2 | 0 R2 OR R3 OR | task name R2 OR R3 OR | entry point, 0x0200 | +----+---- R4)=0 ---|----------- R4)<>0 +-----------------------+ | R3 | 0 | program ident | ??? | +----+---- ---+--------------- ----+-----------------------+ | R4 | 0 | program ident | ??? | +----+-------------------------+---------------------------+-----------------------+ | R5 | 0 or 0x0BBC if | relative block number | start of KMON, also | | | BBC EMTs available[1] | of header | top of memory, | | | | | read from 0x002C | +----+-------------------------+---------------------------+-----------------------+ | R6 | full descending stack | full descending stack | full descending stack | | | stack frame with | | typically 0x0200 | | | command line parameters | | | +----+-------------------------+---------------------------+-----------------------+ | R7 | entry address entry address entry address | +----+-------------------------+---------------------------+-----------------------+ Notes ----- Unix: There will be no memory paged in between the next 4K boundary above the end of the loaded code and the stack rounded down to the 4K boundary. If the loaded code has a Unix header then it will be loaded to address zero in user memory and entered at location zero, so R7 (the PC) will be zero on entry. RT11: After the header has been removed the code is loaded to &0200 onwards, and the program entered there. References ---------- [1] mdfs.net/Apps/Emulators/Tube/PDPTube.zip [2] RT11 Internals