home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1993 March
/
1993-03.d64
/
xdemo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
60 lines
10 if ll= 0 then ll=1:load"xinput",8,1
20 poke650,128:printchr$(14):printchr$(8)
30 xx=52232
40 print"[147]":poke53281,0:poke53280,0:poke646,1
50 sysxx,0,15:print"[216][201][206][208][213][212]"
60 sysxx,3,0:print"[216][201][206][208][213][212] is a replacement for the [194][193][211][201][195]
70 [153]:[153]"input command. right$t provides complete "
80 [153]:[153]"control over the input process..... "
90 [153]: [153]:[153]"e.g. what is your name "
100 [158]xx,13, 2:[153]"(NULL)ou may only use:"
110 [158]xx,15,3:[153]"(NULL)he uppercas/lowercase alphabet keys"
120 [158]xx,16,3:[153]"(NULL)he space bar"
130 [158]xx,18,0:[153]"(NULL)he usual editing & crsr keys are active"
140 al$[178]"azatn(NULL) ":[141]520
150 [158]xx,10,23,15,n$
160 [143]-long
170 [153]"load(NULL)(NULL) ";n$;", note that (NULL)right$(NULL)(NULL)(NULL)(NULL) can"
180 [153]"handle strings of length upto 255":[153]"characters"
190 [153]:[153]"valnter a long string, (this time";
191 [153]" only the lowercase alphabets & numbers can be"
192 [153]" entered)"
200 [158]xx,20,0:[153]"(NULL)emember that crsr up, down left, rightwait keys and ";
210 [153]"and the insert & delete keyswait are active"
220 al$[178]"az 09":[141]520
230 [158]xx,10,0,255,n1$
240 [153]"load(NULL)ou entered the following string:"
250 [153]n1$:[141]480
260 :
270 [143]-range
280 [153]"load(NULL)ou have full control over the charcters that can be entered"
290 [153]"e.g. enter a number in the exponent form"
300 [153]"(like -6.254 e+10)
310 print"[212]he following keys are active:"
320 print" [206]umber keys
330 [153]" (NULL)lus & minus keys
340 print" [212]he alphabet 'e'
350 [153]" (NULL)he decimal point
360 al$="09 ee-.++":gosub520
370 sysxx,16,0,15,n2$
380 sysxx,18,0 :print"[217]ou entered the following number:"
390 printn2$:gosub480
400 :
410 rem-final
420 print"[147][216][201][206][208][213][212] can also provide a default string"
430 print"[197]nter a string using only the space bar[146] & lowercase alphabet keys[146]"
440 al$=" az":gosub520
450 n3$="default string": sysxx,09,5,30,n3$
460 sysxx,13,0:print"you entered the string":printn3$:gosub480
470 printchr$(142):printchr$(9):print"demo over":end
480 sysxx,23,8:print"press any key to go on":poke198,0:wait198,1:poke198,0
490 return
500 :
510 rem-include this subroutine in your own programs
520 al=len(al$):if(al and 1)= 1 thenprint"bad length for [216][201][206][208][213][212]":stop
530 for r= 1 to al
540 poke52940+r,asc(mid$(al$,r,1))
550 next
560 poke52940,al/2
570 return