; STROUT.MAC VERS: 02.08 DATE: 06/10/87 TIME: 21:10 ; COPYRIGHT 1987 William P.N. Smith - Commercial use prohibited! ; ; send a string out to the console, return when done, ; do not disturb any registers. ;rev control begins and null is terminator (not '$') 04/20/87 WPNS ZERO EQU 00H BDOS EQU 0005H STROUT::PUSH AF ;save everything in case the BDOS or BIOS changes them PUSH BC PUSH DE PUSH HL PUSH IX PUSH IY LOOP: LD A,(DE) ;get a(nother) byte CP ZERO ;terminator? JR Z,STEX ;yup, just run along PUSH DE ;before we destroy this, save it! LD E,A ;shuffle byte around LD C,02H ;write byte to console CALL BDOS POP DE ;good thing I kept a copy :+) INC DE ;might be useful to try a different one.... JR LOOP ;and look for another STEX: POP IY ;recover everything POP IX POP HL POP DE POP BC POP AF RET ;and now, just go about your business. END