home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1988 May
/
64er_Magazin_88-05_1988_Markt__Technik_de_Side_A.d64
/
mcc-dmo.inp
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
834b
|
24 lines
100 rem -------------------------------
101 rem - basic simulation of input -
102 rem - i: x (x-co-ord.) 0<x<41 -
103 rem - y (y-co-ord.) 0<y<26 -
104 rem - l (length) 0<l<42-x -
105 rem - in$ string -
106 rem - o: in$ string -
107 rem -------------------------------
108 ifx<1orx>40ory<1ory>25orl<1orx+l>41thenprint"?illegal quantity error";:end
109 ifpeek(157)>0thenprint"?illegal direct error";:end
110 in$=left$(in$+" ",l):p=1
111 poke204,1
112 !p,x,y,in$:!p,x+p-1,y,""
113 poke204,0
114 !g,i$:ifi$=""goto114
115 ifi$=""thenifp<lthenp=p+1
116 ifi$="[157]"thenifp>1thenp=p-1
117 ifi$=chr$(20)thenifp>1thenin$=left$(in$,p-2)+right$(in$,l-p+1)+" ":p=p-1
118 ifi$=chr$(148)thenifp<lthenin$=left$(in$,p-1)+" "+mid$(in$,p,l-p)
119 ifi$=chr$(13)thenpoke204,1:!p,x,y,in$:return
120 ifi$<chr$(32)or(i$>chr$(127)andi$<chr$(160))then111
121 in$=left$(in$,p-1)+i$+right$(in$,l-p):ifp<lthenp=p+1
122 goto111