7BTXT BIN~'TXT COM¤»TXT FOR Á´TXT NOT…+TXT52 Z80 jÿ ÿ ísh1€!€å~þ(BË¿þ~( þ .xþ> 8& ZÍÿÍ·(öþ( bÍá##ÂÅ_ÍÁá#¸í{hÉ ... $$Smaller's Betterísh1€!€å~þ(BË¿þ~( þ .xþ> 8& ZÍÿÍ·(öþ( bÍá##ÂÅ_ÍÁá#¸í{hÉ ... $$Smaller's Better txt.bin is the object file generated by running the slr assembler on txt.z80. txt is one of those great ideas every programmer wishes he had found for himself. The idea of converting a text file into a com file that requires just one command to print it on the screen is both practical and elegant. ~ Features: exit via ^C zeroes high bit of (say WS doc mode) files page breaks are forced with a tilde page breaks every 23 lines support arunz alias: txt get 100 txt.bin;get 180 $1;save $2 $tn1.com r (Usage: /txt fn.ft r) (Where r is fn.ft's record size, *plus 1.* Generates fn.com. Requires 2 arguments and knowledge of the number of records in source.) Pretty cute, n'est pas? Eric Gans French Department UCLA Los Angeles, CA 90024 Updated by Lee Bradley, Small Computer Support, 31 July 1990, 3 August 1990. This library contains a method for converting text files into executable programs. A Z-System support alias is included which concatenates the object code needed onto the text file, which may then be "run." Lee Bradley, Small Computer Support, 3 Aug 90. Source: Z-Node #12 (203) 665- 1100.  txt.bin is the object file generated by running the slr assembler on txt.z80. txt is one of those great ideas every programmer wishes he had found for himself. The idea of converting a text file into a com file that requires just one command to print it on the screen is both practical and elegant. ~ Features: exit via ^C zeroes high bit of (say WS doc mode) files page breaks are forced with a tilde page breaks every 23 lines support arunz alias: txt get 100 txt.bin;get 180 $1;save $2 $tn1.com r (Usage: /txt fn.ft r) (Where r is fn.ft's record size, *plus 1.* Generates fn.com. Requires 2 arguments and knowledge of the number of records in source.) Pretty cute, n'est pas? Eric Gans French Department UCLA Los Angeles, CA 90024 Updated by Lee Bradley, Small Computer Support, 31 July 1990, 3 August 1990.  ; txt.z80 - convert text file to executable program ; Derived from Eric Gans' update to txt.z80 Version 50 ; Revisor/Date/Version Lee Bradley/3 Aug 90/Version 52 ; eliminated bios call, adjusted stacks sizes, eliminated a few labels, etc. ; changed bdos call 1 to call 6. fixed the way the dots ... work. Thanks go ; to Howard Goldstein for these improvements! newst equ 180h org 100h ld (oldst),sp ld sp,newst ld hl,newst ; b=0,c=2 (reg b tracks cr's, reg c used in bdos conout call later) ld bc,2 loop: push hl ld a,(hl) cp 26 jr z,exit res 7,a ; kill hi bit cp '~' ; force page break jr z,page cp 13 ; count cr's jr nz,conout inc b ld a,b cp 23 ld a,13 ; get back cr jr c,conout ; line >= 23 page: ld c,9 ld de,dots ; ... call 5 getkey: ld c,6 ; get key via direct console i/o ld e,0ffh ; get (not put) call 5 or a jr z,getkey ; loop til char received cp 3 ; ^C to exit jr z,exit ld c,9 ld de,bksps call 5 ; back up to line beginning ; b=0,c=2 (re-initialize cr ctr and re-load reg c with conout code) ld bc,2 pop hl inc hl ; get past lf inc hl jr loop conout: push bc ld e,a ; reg c has a 2 in it already (conout) call 5 pop bc pop hl inc hl jr loop exit: ld sp,(oldst) ret dots: db 13,10,' ... ','$' bksps: db 8,8,8,8,8,'$' oldst: ds 2 ; save area for ccp sp db 'Smaller''s Better' ; don't make this any longer! end