;;02-22-85 ;GTXT Gans version of TXT(50) org 100h ld (oldst),sp ld sp,newst ld hl,outms ld bc,2 ;b=0,c=2 conout: push hl ld a,(hl) or a jr z,exit res 7,a ;kill hi bit cp '~' ;force page break jr z,page cp 0dh ;count crlfs jr nz,con1 inc b ld a,b cp 23 ld a,13 ;get back cr jr c,con1 ;line >= 23 page ld c,9 ld de,mms ;[More] call 5 getrt ld l,9 call bios or a jr z,getrt cp 3 ;^C to exit jr z,exit ld c,9 ld de,bms ;kill [More] call 5 ld bc,2 ;b=0,c=2 pop hl inc hl ;get past lf inc hl jr conout con1 push bc cp '^' ;allow ctl chars call z,ctrl ld e,a call 5 pop bc pop hl inc hl jr conout bios: ld a,(2) ld h,a jp (hl) ctrl: pop hl inc hl push hl ld a,(hl) res 7,a cp 40h ;just in case ret c sub 40h ;get ctl char ret exit: ld sp,(oldst) ret oldst: db 13,10,'-->> Insert text between ' db '"?" and "^@"' newst: bms db ' ',13,'$' mms db 13,10,'[More]',13,'$' db 13,10,'?',0dh,0ah outms: db 0,1ah end