! ! VAX IMP V10 PREDEFINITION FILE ! ! NB This file is "verbose rather than obscure" for clarity. It is ! compressed by a special program so that it can be read in rapidly ! by a production compiler. ! ! ! The following are hangovers from the V8 compiler %prim facility ! so that the library can be developed under the old compiler in ! parallel with the new compiler development. They should be replaced ! by definitions of the new %prim when appropriate. ! ! ! ***** %PRIM and %PERM order critical in V8 ****** ! %primintegerfnspec addr(%name n) %primbyteintegermapspec byteinteger(%integer a) %primshortintegermapspec shortinteger(%integer a) %primintegermapspec integer(%integer a) %primstring(*)%mapspec string(%integer a) %primrecord(*)%mapspec record(%integer a) %primrealmapspec real(%integer a) %primlongrealmapspec longreal(%integer a) %primintegerfnspec XXX int(%longreal r) %primintegerfnspec XXX intpt(%longreal r) %permroutinespec XXX readch(%name n) %permroutinespec XXX readsymbol(%name n) %permroutinespec XXX printch(%integer n) %permroutinespec XXX printsymbol(%integer n) %primstring(1)%fnspec tostring(%integer n) %primrealfnspec XXX float(%integer n) %primbytemapspec length(%string(*)%name s) %primbytemapspec charno(%string(*)%name s, %integer p) %primintegerfnspec XXX rem(%integer a,b) %permroutinespec XXX skipitem %permroutinespec XXX skipch %permroutinespec XXX skipsymbol %permroutinespec XXX printstring(%string(255) s) ! ! These currently under discussion as to naming ! %external %string(255) %function %spec In File Name %alias "IMP_IN_FILE_NAME" %external %string(255) %function %spec Out File Name %alias "IMP_OUT_FILE_NAME" %external %routine %spec Complete Input %alias "IMP_COMPLETE_INPUT" %external %routine %spec Complete Output %alias "IMP_COMPLETE_OUTPUT" ! ! The following are the real-and-true definitions of the core stuff ! %const %record(*) %name Nil == 0 %constant %integer NL = 10 %external %routine %spec Space %alias "IMP_SPACE" %external %routine %spec New Line %alias "IMP_NEW_LINE" %external %routine %spec New Page %alias "IMP_NEW_PAGE" %external %routine %spec Spaces %alias "IMP_SPACES" ( %integer N ) %external %routine %spec New Lines %alias "IMP_NEW_LINES" ( %integer N ) %external %integer %function %spec Next Symbol %alias "IMP_NEXT_SYMBOL" %external %routine %spec Skip Symbol %alias "IMP_SKIP_SYMBOL" %external %routine %spec Print Symbol %alias "IMP_PRINT_SYMBOL" ( %integer I ) %external %routine %spec Print String %alias "IMP_PRINT_STRING" - ( %string(255) S ) %external %string(255) %function %spec DATE %alias "IMP_DATE" %external %string(255) %function %spec TIME %alias "IMP_TIME" %external %long %real %function %spec CPU TIME %alias "IMP_CPU_TIME" %external %integer %fn %spec TRUNC %alias "IMP_TRUNC" ( %long %real R ) %external %integer %fn %spec ROUND %alias "IMP_ROUND" ( %long %real R ) %external %integer %fn %spec INT PT %alias "IMP_INT_PT" ( %long %real R ) %external %integer %fn %spec INT %alias "IMP_INT" ( %long %real R ) %external %long %real %fn %spec FLOAT %alias "IMP_FLOAT" ( %long %real R ) %external %long %real %fn %spec FRAC PT %alias "IMP_FRAC_PT" ( %long %real R ) %external %integer %fn %spec REM %alias "IMP_REM" ( %integer A, B ) %external %integer %fn %spec SIZE OF %alias "IMP_SIZE_OF" ( %name N ) %external %integer %fn %spec TYPE OF %alias "IMP_TYPE_OF" ( %name N ) %external %predicate %spec INTERRUPTED %alias "IMP_INTERRUPTED" %external %routine %spec DOING %alias "IMP_DOING" ( %string(255) S ) %external %routine %spec Read Line %alias "IMP_READ_LINE" ( %string(*) %name S ) %external %routine %spec Read Symbol %alias "IMP_READ_SYMBOL" ( %name N ) %external %routine %spec Read %alias "IMP_READ" ( %name N ) %external %routine %spec Write %alias "IMP_WRITE" ( %integer N, P ) %external %string(255) %fn %spec I To S %alias "IMP_I_TO_S" ( %integer N, P ) %external %string(255) %fn %spec F To S %alias "IMP_F_TO_S" - ( %long %real X, %integer N ) %external %string(255) %fn %spec R To S %alias "IMP_R_TO_S" - ( %long %real X, %integer N, O ) %external %routine %spec Print FL %alias "IMP_PRINT_FL" - ( %long %real R, %integer N ) %external %routine %spec Print %alias "IMP_PRINT" - ( %long %real R, %integer B, A ) %externalpredicatespec End Of Input %alias "IMP_END_OF_INPUT" %externalroutinespec Prompt %alias "IMP_PROMPT" ( %string(255) S ) %externalroutinespec Open Input %alias "IMP_OPEN_INPUT" - ( %integer N, %string(255) S ) %externalroutinespec Open Output %alias "IMP_OPEN_OUTPUT" - ( %integer N, %string(255) S ) %externalroutinespec Open Binary Input %alias "IMP_OPEN_BINARY_INPUT" - ( %integer N, %string(255) S ) %externalroutinespec Open Binary Output %alias "IMP_OPEN_BINARY_OUTPUT" - ( %integer N, %string(255) S ) %externalroutinespec Select Input %alias "IMP_SELECT_INPUT" ( %integer N ) %externalroutinespec Close Input %alias "IMP_CLOSE_INPUT" %externalroutinespec Reset Input %alias "IMP_RESET_INPUT" %externalroutinespec Abandon Input %alias "IMP_ABANDON_INPUT" %externalroutinespec Position Input %alias "IMP_POSITION_INPUT" ( %integer N ) %externalroutinespec Select Output %alias "IMP_SELECT_OUTPUT" ( %integer N ) %externalroutinespec Close Output %alias "IMP_CLOSE_OUTPUT" %externalroutinespec Reset Output %alias "IMP_RESET_OUTPUT" %externalroutinespec Abandon Output %alias "IMP_ABANDON_OUTPUT" %externalroutinespec Position Output %alias "IMP_POSITION_OUTPUT" ( %integer N ) %externalintegerfnspec Input Stream %alias "IMP_INPUT_STREAM" %externalintegerfnspec Input Position %alias "IMP_INPUT_POSITION" %externalintegerfnspec Output Stream %alias "IMP_OUTPUT_STREAM" %externalintegerfnspec Output Position %alias "IMP_OUTPUT_POSITION" %external %record(*) %map %spec New %alias "IMP_NEW" ( %name Template ) %external %routine %spec Dispose %alias "IMP_DISPOSE" ( %name Thing ) %record %format Event Fm ( %integer Event, Sub, Extra, %string(255) Message) %external %record(Event Fm) %spec Event %alias "IMP_EVENT" %external %string(255) %function %spec Sub String %alias "IMP_SUB_STRING" - ( %string(255) S, %integer From, To ) ! ! Force startup of IMP RTL ! %external %integer %spec XXX IMPLINK XXX %alias "IMP___LINKAGE" %end %of %perm