; Standard interface definitons for the Hawk monitor. ; Linkage conventions: ; R1 -- used for linkage by all support routines. ; R2 -- typically used internally as an activation record pointer. ; R3 -- typically the first parameter and function return value ; R4 -- typically the second parameter, if there is one. ; This file allocates one word pointing to each monitor function. ALIGN 4 ;------------------------------- ; linkage the one universal monitor service EXT EXIT ; terminate application ; touches nothing! ;------------------------------- ; linkage to monitor display management routines EXT DSPINI ; initialize display ; returns R3=columns (X size of display) ; returns R4=lines (Y size of display) EXT DSPAT ; set display text coordinates ; takes R3=X R4=Y (origin in top left) ; wipes out R2-7 EXT DSPCH ; output one character ; takes R3=character ; wipes out R4-5, increments X EXT DSPST ; output one null terminated string ; takes R3=string pointer ; wipes out R3-7, increments X EXT DSPHX ; output integer in hexadecimal ; takes R3=integer to print ; wipes out R3-7, increments X EXT DSPDEC ; output signed integer in decimal EXT DSPDECU ; output unsigned integer in decimal ; takes R3=integer to print ; takes R4=field width ; wipes out R3-6, increments X ;------------------------------- ; linkage to monitor keyboard interface EXT KBGETC ; get a character from the keyboard ; returns R3=character ; wipes out R4 EXT KBGETS ; get null-terminated string from keyboard ; takes R3=pointer to string buffer ; wipes out R3-7 ;------------------------------- ; arithmetic routines EXT MUL ; multiply two signed integers ; takes R3=multiplicand R4=multiplier ; returns R3=product ; wipes out R4-6 EXT DIVU ; divide two unsigned integers ; takes R3=dividend R4=divisor ; returns R3=quotient R4=remainder ; wipes out R5-6