; > echo.mac ; Echo typed in characters to output ; PROGRAM INFORMATION ; ------------------- #define _TITLE$ "Echo" #define _VERSION% &00 #define _VERSION$ "0.01 (01 Jan 2001)" #define _COPYRIGHT$ "(C)J.G.Harston" ; PROGRAM HEADER ; -------------- #include
; PROGRAM CODE ; ------------ ._ENTRY% adr msghello,r1 ; Point to welcome message jsr pc,IO_WrString ; Print welcome message .loop adr msgprompt,r1 ; Point to prompt jsr pc,IO_WrString ; Print prompt adr buffer,r1 ; Point to input buffer jsr pc,IO_ReadLine ; Read a line of text bcc loop ; Loop until Escape rts pc ; Exit ; INTERFACE CODE ; -------------- #include ; PROGRAM DATA ; ------------ ._DATA% .msghello equs "Characters typed will be echoed.",13 equs "Press ESCAPE to terminate.",13,0 .msgprompt equs "-> ",0 align ; PROGRAM WORKSPACE ; ----------------- ._BSS% .buffer equw 0 ._END%