; ; termScript.sh ; ; Coroutine handling for Termite Script ; ; © 1995 Straylight ; ;----- Overview ------------------------------------------------------------- ; ; Functions provided: ; ; tsc_wait ; tsc_end ; tsc_error [ :LNOT::DEF:termScript__dfn GBLL termScript__dfn ; --- tsc_wait --- ; ; On entry: -- ; ; On exit: R0, R1, R2 == event and arguments from Termite ; ; Use: Waits for some multitasking and gets something from Termite. IMPORT tsc_wait ; --- tsc_end --- ; ; On entry: R0 == pointer to script to chain, 0 to just end, or -1 for ; FINISH ; ; On exit: Doesn't, hopefully ; ; Use: Ends the script, optionally starting up another one. IMPORT tsc_end ; --- tsc_error --- ; ; On entry: R0 == pointer to error block ; ; On exit: Doesn't, probably ; ; Use: Returns an error to Termite. IMPORT tsc_error ; --- Event codes returned by tsc_wait --- ^ 0 tscEvent_poll # 1 ;Nothing interesting happened tscEvent_serial # 1 ;Serial input received ;R1 == address of block ;R2 == size of block tscEvent_key # 1 ;User pressed a key ;R1 == key number (from WIMP) ] ;----- That's all, folks ---------------------------------------------------- END