home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 May
/
1994-05b.d64
/
convert
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
848b
|
22 lines
670 def fn p1(x)=x+128+128*(x>31)+64*(x>63)-32*(x>95)-96*(x>127)+128*(x>159)
675 def fn ps(x)=fn p1(x)+64*(x>191)+33*(x>254)
680 def fn sp(x)=x+64+64*(x>31)-128*(x>63)+64*(x>95)+192*(x>127)-64*(x>191)
685 def fn a1(x)=x+(x*(x>127))-126*(x>127)
690 def fn a2(x)=x-32*(x>64 and x<91)+32*(x>96 and x<123)+128*(x>192 and x<219)
695 def fn cv(x)=fn a1(fn a2(x))
698 rem"[192][192][192][192][192][192][192]chop here[192][192][192][192][192]
700 [153]"loadstop*** input file ***":[141]900:[159]2,8,2,x$[170]","[170]y$[170]",r":f[178]x
710 [153]"*** output file ***":[141]900:[159]3,8,3,x$[170]","[170]y$[170]",w":t[178]x
720 [161]#2,x$:x[178][198](x$[170][199](0)):[139] st [175] 64 [167]790
730 [139]f[178]1[175]t[178]2[167]x[178][165] cv(x)
735 [139]f[178]1[175]t[178]3[167]x[178][165] ps(x)
740 [139]f[178]2[175]t[178]1[167]x[178][165] cv(x)
750 [139]f[178]2[175]t[178]3[167]x[178][165] ps([165] cv(x))
760 [139]f[178]3[175]t[178]1[167]x[178][165] sp(x)
770 [139]f[178]3[175]t[178]2[167]x[178][165] cv([165] sp(x))
780 [152]3,[199](x);:[153]".";:[137]720
790 [160]2:[160]3:[153]"done":[128]
900 [133]"filename";x$:[133]"file type: seq, prg, usr (s,p,u)";y$
910 [153]"file contents:":[153]"1-pet ascii 2-true ascii 3-screen pokes"
920 [133]x:[142]