******************************************************************
*** ***
*** comp.binaries.cbm is a moderated binaries- ***
*** only newsgroup (no discussion or ***
*** crossposting allowed) for Commodore 8-bits ***
*** ***
*** For information on comp.binaries.cbm visit ***
***
http://www.floodgap.com/comp.binaries.cbm/ ***
*** ***
*** This file is available via mailing list at ***
***
http://lists.trikaliotis.net/listinfo/comp-binaries-cbm/ ***
*** to list subscribers ***
*** Allow time for submission to be received ***
*** ***
******************************************************************
* One from the Vault is a collection of frequently requested, useful or just
plain interesting past posts sent to comp.binaries.cbm, as archived by the
moderators. If you have a request, please send it to the address in the
headers. In addition to being selected and reposted by moderation staff,
some of these postings are regularly posted on Mondays and Fridays on a
rotating schedule.
Take care when replying to these messages, as many were posted years ago.
From: Peter Karlsson <nospam@perkele.coyote.org>
Reply-to: Peter Karlsson <nospam@perkele.coyote.org>
X-Original-Posting-Date: 10 Jan 98 18:41:35 GMT
[ This was posted to comp.sys.cbm, and I thought it would be cool to have it
here as well. This is given as a BASIC listing, not as a uuencoded file.
If you are unable to convert it, try just simply typing it in -- it's fairly
short.
-- Cameron Kaiser ]
I wrote this small BASIC program for a Fidonet CBM echo, and thought it
might be of interest here, too. It shows the keyboard layout of a C64.
It should be modified to use the keyboard layout pointers instead (it
doesn't *really* matter, since they are in ROM).
start tok64 key64.prg
4 REM set colours
5 POKE53280,.:POKE53281,.:PRINT"{clear}{white}";
10 DIMad(3),n$(3):REM layouts
11 FORi=.TO3:READad(i),n$(i):NEXT
12 DATA60289,normal,60354,shift,60419,cbm,60536,control
20 DIMky(64):REM key positions
21 FORi=.TO63:READky(i):NEXT
22 DATA15,47,63,68,65,66,67,62
23 DATA 3,19,34, 4,51,35,20,49
24 DATA 5,21,36, 6,53,37,22,52
25 DATA 7,23,38, 8,55,39,24,54
26 DATA 9,25,40,10,57,41,26,56
27 DATA11,27,42,12,59,43,28,58
28 DATA13,29,44,14,61,45,30,60
29 DATA 1, 0,16, 2,64,48,18,32
30 REM print keyboards
31 d$="{home}{down*20}"
32 r$="{right*40}"
40 FORi=.TO3:REM cycle layouts
41 POKE646,i+2:REM colour
42 r=INT(i/2):c=0:IFi=1ORi=3THENc=1:REM layout offset
43 PRINTLEFT$(d$,r+1)LEFT$(r$,c*10)n$(i)
50 FORj=.TO63:REM cycle keys
51 c$=CHR$(PEEK(ad(i)+j)):REM read
52 REM handle special codes (0-31,128-159)
53 IFASC(c$)<32THENc$="{reverse on}"+CHR$(ASC(c$)+64)+"{reverse off}":GOTO60
54 IFASC(c$)>127ANDASC(c$)<161THENc$="{reverse on}"+CHR$(ASC(c$)-32)+"{reverse off}":GOTO60
60 ro=INT(ky(j)/16):REM keyboard row
61 co=ky(j)AND15:REM keyboard column
63 PRINTLEFT$(d$,ro*3+4+r)LEFT$(r$,co*2+c)c$:REM position and print
99 NEXTj,i
100 PRINT"{home}{down*16}{gray}";
stop tok64
(bastext 1.0)
--
\\//
Peter -
http://nafmo.home.ml.org/ - ICQ UIN 762719
-
nospam@perkele.coyote.org _is_ valid
--
Cameron Kaiser *
ckaiser@floodgap.com * posting with a Commodore 128
Floodgap Systems:
http://www.floodgap.com/
personal page:
http://www.cameronkaiser.com/
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)