home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
mbug
/
mbug094.arc
/
FIX-256.ARC
/
KEYBOARD.DOC
< prev
next >
Wrap
Text File
|
1988-06-14
|
52KB
|
1,682 lines
Programming Notes on the 256TC
Thesσ note≤ havσ beeε compileΣ froφ variou≤ source≤ anΣ havσ ì
beeε designeΣ t∩ aiΣ thσ develope≥ t∩ producσ softwarσ whicΦ wil∞ ì
ruε efficientl∙ oε Microbee'≤ ne≈ 256T├ mode∞ microcomputer« I⌠ ì
als∩ aim≤ t∩ givσ hiφ hel≡ iε maintaininτ compatibilit∙ witΦ ì
olde≥ mode∞ Microbees« Thσ note≤ arσ iε threσ section≤ - thσ ì
firs⌠ deal≤ witΦ thσ ne≈ keyboard¼ thσ seconΣ witΦ colou≥ anΣ ì
graphic≤ anΣ thσ thirΣ deal≤ witΦ ho≈ t∩ usσ ZBASIC¼ ß versioε oµ ì
MicroWorlΣ BASI├ v6.22σ whicΦ i≤ compatiblσ witΦ mos⌠ operatinτ ì
systems.
Thesσ note≤ havσ beeε issueΣ witΦ aε accompanyinτ disδ whicΦ ì
contain≤ program≤ anΣ routine≤ whicΦ ma∙ als∩ bσ oµ somσ usσ t∩ ì
developers« Al∞ routine≤ giveε iε thesσ programminτ note≤ caε bσ ì
founΣ oε thσ accompanyinτ disδ eithe≥ iε thσ filσ ROUTINES.PA╦ iµ ì
the∙ arσ assembl∙ language¼ o≥ a≤ separatσ .MW┬ file≤ iµ the∙ arσ ì
BASIC« Al∞ assembl∙ languagσ routine≤ havσ beeε designeΣ t∩ bσ ì
assembleΣ b∙ thσ MACRO-8░ assembler« Somσ modificatioε ma∙ bσ ì
necessar∙ fo≥ othe≥ assemblers.
INDEX
Section Page
I The 256TC Keyboard 2
II Colour & Graphics 18
III Using ZBASIC 32
.paèSECTION I : The Keyboard
Introduction
Thσ 256T├ Microbeσ use≤ ß ne≈ keyboard« Thi≤ ne≈ keyboarΣ ì
represent≤ ß significan⌠ improvemen⌠ ove≥ thσ previou≤ design¼ ì
no⌠ onl∙ iε it≤ improveΣ looδ anΣ feel¼ easσ oµ usσ anΣ increaseΣ ì
numbe≥ oµ keys¼ bu⌠ als∩ iε it≤ simplicit∙ t∩ implemen⌠ iε ì
programming« However¼ i⌠ present≤ ß majo≥ probleφ wheε tryinτ t∩ ì
maintaiε compatibilit∙ witΦ olde≥ microbees« Thσ proliferatioε ì
oµ differen⌠ operatinτ system≤ anΣ shell≤ iε recen⌠ year≤ ha≤ ì
madσ thσ probleφ eveε harder¼ bu⌠ thσ probleφ i≤ no⌠ ì
insurmountable« Thesσ note≤ includσ tip≤ anΣ technique≤ t∩ hel≡ ì
thσ programme≥ ge⌠ thσ maximuφ benefit≤ ou⌠ oµ thi≤ ne≈ keyboard.
Implementation in Microworld BASIC
WitΦ eacΦ Microbeσ solΣ t∩ date¼ ß versioε oµ BASI├ ha≤ beeε ì
issueΣ o≥ made availablσ whicΦ ha≤ beeε designeΣ t∩ ruε witΦ tha⌠ ì
mode∞ oµ Microbeσ anΣ witΦ it≤ particula≥ shel∞ anΣ operatinτ ì
system« Onσ oµ thσ problem≤ faceΣ b∙ developer≤ i≤ tha⌠ wheε ì
the∙ havσ writteε ß prograφ iε BASI├ oε thei≥ machinσ anΣ havσ ì
theε useΣ thσ disδ oε o≥ distributeΣ ß cop∙ oµ thσ disδ t∩ ì
anothe≥ mode∞ oµ Microbee¼ i⌠ n∩ longe≥ works« Thi≤ i≤ becausσ ì
onσ oµ threσ thing≤ i≤ incompatiblσ witΦ thσ othe≥ Microbee:
* the operating system or shell
* the version of BASIC, or
* the BASIC program itself
Man∙ oµ thσ recen⌠ operatinτ system≤ anΣ shell≤ arσ ver∙ ì
finick∙ a≤ t∩ whethe≥ the∙ arσ runninτ oε ß 256T├ o≥ ß 128k¼ o≥ ì
oε ß 128δ o≥ ß 64k¼ etc« Also¼ ß versioε oµ BASI├ runninτ unde≥ ì
ß Shel∞ i⌠ wa≤ no⌠ designeΣ fo≥ ma∙ als∩ creatσ problems« Fo≥ ì
instance¼ thσ lates⌠ version≤ oµ BASI├ (version≤ 6.│ anΣ later⌐ ì
wil∞ no⌠ worδ oε ß 64δ compute≥ a⌠ al∞ a≤ thσ BASI├ i≤ simpl∙ t∩ ì
biτ t∩ fi⌠ iε memory« Iµ thσ probleφ i≤ eithe≥ thσ operatinτ ì
system¼ shel∞ o≥ thσ versioε oµ BASIC¼ tw∩ possiblσ solution≤ are
i distributσ thσ program≤ oε disk≤ withou⌠ thσ operatinτ ì
ááááásysteφ o≥ shel∞ anΣ withou⌠ ß versioε oµ BASIC¼ insteaΣ ì
áááááleavinτ thσ enΣ use≥ t∩ suppl∙ hi≤ owε versioε oµ CP/═ anΣ ì
áááááBASIC¼ or
ii distributσ thσ program≤ witΦ ZBASI├ anΣ thσ CCP┌ operatinτ ì
ááááásystem (see details of ZBASIC and CCPZ below).
Iµ thσ probleφ i≤ witΦ thσ BASI├ prograφ itselµ theε thσ ì
followinτ note≤ oε maintaininτ compatibilit∙ wil∞ bσ useful.
Al∞ keyboarΣ command≤ iε BASI├ (eg« INPUT¼ KEY$⌐ wil∞ worδ ì
identicall∙ fo≥ olΣ anΣ ne≈ keyboards« Therefore¼ al∞ program≤ ì
usinτ thesσ command≤ shoulΣ encounte≥ n∩ problem≤ iµ yo⌡ arσ ìèusinτ thσ correc⌠ versioε oµ BASI├ fo≥ you≥ machinσ (ie« thσ ì
versioε oµ BASI├ designeΣ t∩ worδ witΦ you≥ system)« However¼ ì
machinσ codσ fragment≤ imbeddeΣ withiε BASI├ program≤ ma∙ presen⌠ ì
ß probleφ iµ the∙ arσ designeΣ t∩ scaε thσ keyboard« Thesσ ì
shoulΣ bσ carefull∙ checkeΣ t∩ seσ tha⌠ the∙ mee⌠ thσ ì
compatibilit∙ criteriß se⌠ ou⌠ below.
Compatibilit∙ witΦ existinτ BASIC≤ oµ an∙ embeddeΣ machinσ ì
codσ fragmen⌠ withiε ß BASI├ prograφ i≤ assureΣ providinτ it≤ ì
operatioε relie≤ on
* memory location 10╢ (ASCI╔ valuσ oµ las⌠ ke∙ pressed)
* keyboarΣ routine a⌠ 800╢ (DGO╙ wai⌠ fo≥ keyboarΣ input)
* keyboard routine atá800╣ (DGO╙ scaε keyboard)
¬ keyboarΣ routinσ a⌠ A50┴ (tes⌠ iµ ke∙ i≤ pressed, Is_Closed⌐
* routine a⌠ 803╞ (redirecteΣ input⌐, or
¬ routine at A5C▓ (linσ inpu⌠ oµ text)
Iµ method≤ othe≥ thaε thesσ havσ beeε employeΣ t∩ scaε thσ ì
keyboarΣ theε compatibilit∙ i≤ no⌠ guaranteeΣ anΣ the∙ neeΣ t∩ bσ ì
modifieΣ s∩ tha⌠ the∙ eithe≥ usσ thσ abovσ method≤ o≥ usσ ì
additiona∞ method≤ discusseΣ iε thσ sectioε, Implementatioε iε ì
Machine Language, below.
Notσ tha⌠ thσ routine≤ a⌠ A50┴ anΣ A5C▓ arσ non-standarΣ ì
interna∞ routines« BotΦ oµ thesσ routine≤ arσ supporteΣ iε ì
existinτ BASICs« However¼ a≤ s∩ man∙ programmer≤ usσ thσ routinσ ì
a⌠ A50A¼ i⌠ ha≤ beeε decideΣ tha⌠ thi≤ routinσ wil∞ also bσ retaineΣ ì
iε al∞ futurσ version≤ oµ BASI├.
Implementation in Machine Language.
Thσ ne≈ 256T├ keyboarΣ i≤ fundamentall∙ differen⌠ t∩ thσ olΣ ì
standarΣ Microbeσ keyboard« Hence¼ aε entirel∙ ne≈ programminτ ì
approacΦ i≤ needeΣ t∩ usσ thσ keyboard« Fortunately¼ thσ newe≥ ì
version≤ oµ CP/═ releaseΣ witΦ thσ 256T├ automaticall∙ detec⌠ ì
whicΦ keyboarΣ i⌠ i≤ runninτ oε anΣ swap≤ ove≥ it≤ keyboarΣ ì
routine≤ accordingly« Thus¼ keyboarΣ inpu⌠ ma∙ bσ carrieΣ ou⌠ ì
normall∙ b∙ usinτ thσ standarΣ BDO╙ anΣ BIO╙ routines.
XBIOS subset 'C'
Iε additioε t∩ thesσ routines¼ extrß keyboarΣ routine≤ havσ ì
beeε addeΣ iε thσ currentl∙ existinτ extendeΣ BIO╙ (XBIOS)« ì
However¼ i⌠ mus⌠ bσ pointeΣ ou⌠ tha⌠ man∙ version≤ oµ CP/═ ì
releaseΣ witΦ olde≥ Microbee≤ d∩ no⌠ suppor⌠ XBIOS¼ s∩ thσ ì
application≤ oµ thesσ routine≤ arσ limiteΣ iµ thσ programme≥ ì
want≤ compatibilit∙ witΦ al∞ systems«
.cp 5è T∩ usσ thesσ extrß routines¼ i⌠ i≤ necessar∙ t∩ determinσ iµ ì
thσ BIO╙ you≥ CP/═ applicatioε i≤ runninτ unde≥ i≤ thσ requireΣ ì
versioε oµ XBIO╙ (knowε a≤ subse⌠ 'C')« T∩ d∩ this¼ thσ versioε ì
numbe≥ oµ thσ BIO╙ i≤ checked« Thσ followinτ routinσ i≤ aε ì
examplσ oµ ho≈ thi≤ caε bσ done
;----------------<ROUTINE to CHECK BIOS NUMBER>-----------------
biosvct equ 0001h
Check_BIOS:
; Check_BIOS checks the BIOS version number to find out whether
; the BIOS supports XBIOS subset 'C'. It uses this logic:
; IF Bios_Type IS
; > 1 and < 17h and <> 6 or
; > 1Dh and < 2Fh or
; > 43h and < BFh
; THEN XBIOS subset 'C' is supported
; ELSE subset 'C' is not supported (see notes below for this case)
; If XBIOS is supported then the Z flag will be set
push de
push hl
lΣ hl,(biosvct⌐ ╗ warφ star⌠ entr∙ (BIO╙ ½ 3)
ld de,30h
add hl,de ╗ (BIO╙ ½ 33h⌐ ╜ BIOS_TYPE
ld e,a
ld a,(hl)
ld d,0 ; set flag to true
cp 2 ; check version numbers
jr c,xbfail
cp 6
jr z,xbfail
cp 17h
jr c,use_xb
cp 1Eh
jr c,xbfail
cp 2Fh
jr c,use_xb
cp 44h
jr c,xbfail
cp 0BFh
jr c,use_xb
xbfail║ lΣ d,-▒ ╗ flag=falsσ (incorrec⌠ XBIOS)
use_xb: ld a,d
or a ; test flag
ld a,e
pop hl
pop de
ret
.cp 4èNew Calls in XBIOS subset 'C'
Thσ followinτ i≤ ß descriptioε oµ thσ │ ne≈ call≤ provideΣ ì
iε XBIO╙ subse⌠ ├ - thσ existinτ call≤ wil∞ no⌠ bσ discusseΣ.
Iµ yo⌡ havσ no⌠ useΣ XBIO╙ call≤ before¼ the∙ arσ simplσ t∩ ì
use« T∩ cal∞ ß giveε functioε, placσ thσ functioε numbe≥ iε thσ ì
accumulator¼ loaΣ thσ othe≥ register≤ a≤ specifieΣ fo≥ thσ ì
particular function, and do a RST 28h.
The new functions are listed below:
XBIOS function 15 : kb_test
Usage:
ld c,key_code
ld a,15
rst 28h
Thi≤ functioε check≤ t∩ seσ iµ thσ ke∙ whosσ codσ i≤ iε thσ ì
├ registe≥ (seσ belo≈ fo≥ tablσ oµ codes⌐ i≤ currentl∙ dowε oε ì
thσ keyboard« Iµ i⌠ i≤ dowε i⌠ return≤ witΦ thσ ┌ flaτ set¼ iµ ì
it is up it returns with NZ status.
I⌠ shoulΣ bσ noteΣ tha⌠ thσ fac⌠ tha⌠ thi≤ functioε i≤ ì
availablσ doe≤ no⌠ necessaril∙ meaε tha⌠ thσ ne≈ 256TC keyboarΣ ì
i≤ beinτ used« Therefore¼ onσ shoulΣ bea≥ iε minΣ tha⌠ b∙ ì
relyinτ key≤ whicΦ arσ onl∙ availablσ oε thσ 256TC keyboarΣ (eg« ì
ALT)¼ thσ prograφ i≤ madσ incompatiblσ witΦ thσ existinτ 'old-ì
styleº keyboards« Thi≤ doe≤ no⌠ meaε tha⌠ thesσ key≤ shoulΣ no⌠ ì
bσ offereΣ a≤ aε alternativσ fo≥ user≤ witΦ ne≈ keyboards¼ bu⌠ aε ì
alternativσ shoulΣ bσ offereΣ fo≥ thσ olde≥ keyboard≤ (eg« thσ ì
alternativσ fo≥ up-arro≈ coulΣ bσ control-┼ oε thσ olΣ keyboard)« ì
Notσ tha⌠ iµ ß ke∙ whicΦ onl∙ exist≤ oε thσ ne≈ keyboarΣ i≤ ì
checkeΣ oε ß machinσ usinτ aε olΣ keyboarΣ thσ key-u≡ (NZ⌐ statu≤ ì
will always be returned.
Als∩ notσ tha⌠ oε ß systeφ witΦ thσ ne≈ keyboard¼ thσ ì
KB_TES╘ routinσ wil∞ als∩ storσ an∙ typeΣ character≤ iε ß queuσ ì
witΦ ß minimuφ queuσ lengtΦ oµ 2░ character≤ anΣ thesσ character≤ ì
wil∞ bσ returneΣ viß thσ standarΣ BDOS/BIO╙ keyboarΣ routines« ì
Hence¼ afte≥ KB_TEST ha≤ beeε useΣ anΣ yo⌡ wan⌠ t∩ returε t∩ ì
norma∞ keyboarΣ usagσ (eτ linσ input)¼ i⌠ i≤ ß gooΣ ideß t∩ clea≥ ì
ou⌠ thi≤ queuσ b∙ repeatedl∙ callinτ BDO╙ consolσ iε unti∞ n∩ ì
morσ key≤ arσ founΣ beforσ promptinτ thσ use≥ fo≥ input¼ a≤ iε ì
this subroutine
;------------------<CLEAR QUEUE after KB_TEST>-------------------
bdos equ 0005h ; BDOS jump vector
dconio equ 6 ; BDOS direct console in/out
clr_queue:
; Clears console queue for normal keyboard use after kb_test
ld e,-1 ; signal console inè ld c,dconio
call bdos
or a
jr nz,clr_queue
ret
Belo≈ i≤ ß lis⌠ oµ thσ key≤ oε thσ differen⌠ keyboard≤ anΣ ì
thσ correspondinτ code≤ t∩ pas≤ t∩ KB_TEST iµ the∙ arσ down« Yo⌡ ì
wil∞ notσ tha⌠ thσ firs⌠ 6┤ code≤ arσ thσ samσ a≤ thσ matri° ì
code≤ fo≥ thσ key≤ oε thσ olΣ keyboarΣ fo≥ obviou≤ reason≤ oµ ì
compatibilty.
Keycodes Standard KB 256TC KB
0 @ ' "
1 to 26 A to Z A to Z
27 [ { [ {
28 \ | \ |
29 ] } ] }
30 ^ ~ ` ~
31 DEL DEL *
32 0 0 )
33 1 ! 1 !
34 2 " 2 @
35 3 # 3 #
36 4 $ 4 $
37 5 % 5 %
38 6 & 6 ^
39 7 ' 7 &
40 8 ( 8 *
41 9 ) 9 (
42 : * ; :
43 ; + = +
44 , < , <
45 - = - _
46 . > . >
47 / ? / ?
48 ESC ESC
49 BACK SPACE CORRECT
50 TAB TAB BACKTAB
51 LINE FEED SQUARE BOX
52 RETURN RETURN
53 LOCK CAPS LOCK
54 BREAK BRK #
55 SPACE SPACE
56 ARROW-UP ARROW-UP
57 CTRL CTRL
58 ARROW-DOWN ARROW-DOWN
59 ARROW-LEFT ARROW-LEFT HOME
60 not used not used
61 not used not used
62 ARROW-RIGHT ARROW-RIGHT END
63 SHIFT SHIFT
64 not used ALT
65 not used F1
66 not used F2è 67 not used F3
68 not used F4
69 not used F5
70 not used F6
71 not used F7
72 not used F8
73 not used F9
74 not used F10
75 not used F11
76 not used F12
77 not used ESC
78 not used UP-ARROW
79 not used INS
80 not used DEL *
81 not used LEFT-ARROW HOME
82 not used DOWN-ARROW
83 not used RIGHT-ARROW END
84 not used BRK #
85 not used 7 (num keypad)
86 not used 8 (num keypad)
87 not used 9 (num keypad)
88 not used DIVIDE
89 not used 4 (num keypad)
90 not used 5 (num keypad)
91 not used 6 (num keypad)
92 not used MULTIPLY
93 not used 1 (num keypad)
94 not used 2 (num keypad)
95 not used 3 (num keypad)
96 not used SUBTRACT
97 not used 0 (num keypad)
98 not used . (num keypad)
99 not used ADD
Note║ Thσ codσ fo≥ aε almos⌠ identica∞ routinσ i≤ giveε iε ful∞ ì
iε thσ sectioε Replacinτ Is_CloseΣ below.
XBIOS function 16 : pkey_set
Usage:
ld hl,key_table_addr
ld a,16
rst 28h
(AF, BC, DE and HL are corrupted)
Thi≤ functioε copie≤ thσ tablσ a⌠ (HL⌐ t∩ thσ interna∞ ì
programmablσ ke∙ buffer« Oε thσ standarΣ Microbeσ keyboarΣ thσ ì
functioε key≤ arσ CTR╠ 1-9¼ providinτ ╣ functioε keys« Oε thσ ì
256TC keyboarΣ therσ arσ 1▓ functioε key≤ - F▒ t∩ F12« Thσ datß ì
provideΣ t∩ thi≤ routinσ mus⌠ definσ AL╠ 1▓ functioε keys¼ eveε ì
if only 9 are actually used.
The format for the data table is as follows:
key_table_addr:è db length_of_F1_data ; eg. 6
db F1 data-string ; eg. 'BASIC',0Dh
db length_of_F2_data ; eg. 6
db F2 data-string ; eg. 'TURBO',0Dh
...
...
db length_of_F12_data ; last entry, eg. 3
db F12 data-string ; eg. 'WP',0Dh
XBIOS function 17 : pkey_read
Usage:
ld hl,func_table_buffer
ld a,17
rst 28h
(AF, BC, DE and HL corrupted)
Thi≤ functioε copie≤ thσ interna∞ programmablσ ke∙ buffe≥ t∩ ì
thσ user'≤ buffe≥ a⌠ (HL)« Thσ prograφ shoulΣ providσ a⌠ leas⌠ ì
102┤ (400h⌐ byte≤ a⌠ (HL⌐ a≤ thσ interna∞ ke∙ buffe≥ bσ les≤ thaε ì
o≥ equa∞ t∩ thi≤ size¼ bu⌠ neve≥ larger« PKEY_REA─ als∩ return≤ ì
thσ maximuφ buffe≥ sizσ iε H╠ - thi≤ functioε shoulΣ bσ calleΣ ì
beforσ attemptinτ t∩ se⌠ u≡ ne≈ functioε key≤ witΦ PKEY_SET t∩ ì
ensurσ thσ ne≈ ke∙ datß i≤ no⌠ to∩ lonτ (ie« longe≥ thaε thσ ì
value returned in HL).
Using the 256TC Keyboard Independent of Operating Systems
Somσ application≤ requirσ tha⌠ thσ softwarσ bσ independen⌠ ì
oµ thσ operatinτ systeφ (fo≥ instance¼ mos⌠ machinσ languagσ ì
games)« Also¼ application≤ oµ thσ specia∞ XBIO╙ routine≤ arσ ì
limiteΣ a≤ somσ system≤ wil∞ no⌠ havσ thσ XBIO╙ implemented« Iµ ì
thesσ routine≤ arσ vita∞ t∩ thσ operatioε oµ you≥ program¼ theε ì
compatibilit∙ betweeε system≤ i≤ limited« Thσ neeΣ thereforσ ì
arise≤ fo≥ keyboarΣ routine≤ independen⌠ oµ thσ operatinτ systeφ ì
fo≥ truσ compatibility« Independencσ froφ thσ operatinτ systeφ ì
i≤ thσ areß tha⌠ wil∞ bσ discusseΣ here.
ThrougΦ machinσ languagσ test≤ (eg« througΦ checkinτ somσ ì
por⌠ o≥ othe≥ fo≥ ß signal)¼ i⌠ i≤ impossiblσ t∩ determinσ whicΦ ì
versioε oµ thσ keyboarΣ i≤ beinτ used« Fo≥ thi≤ reason¼ i⌠ ha≤ ì
beeε decideΣ tha⌠ al∞ model≤ whicΦ suppor⌠ thσ 256TC keyboarΣ ì
wil∞ havσ thσ number≤ '256º iε thσ las⌠ threσ byte≤ beforσ thσ ì
screeε RA═ (ie« EFFDΦ t∩ EFFFh)« However¼ iε thσ 256TC thi≤ areß ì
i≤ no⌠ RO═ bu⌠ merel∙ ß RO═ imagσ (iε RAM⌐ anΣ hence¼ caε bσ ì
erased« S∩ thσ '256º ma∙ no⌠ bσ present« Nevertheless¼ i⌠ ì
almos⌠ certainl∙ wil∞ bσ therσ (a≤ thi≤ areß als∩ contain≤ ì
importan⌠ systeφ routines⌐ and¼ iε an∙ case¼ i⌠ i≤ restoreΣ afte≥ ì
ever∙ reset«
Thσ exceptioε t∩ thi≤ i≤ wheε you≥ prograφ i≤ operatinτ ì
unde≥ ß shell« Somσ version≤ oµ thσ shel∞ overwritσ thi≤ areß ìècompletel∙ anΣ thσ '256º wil∞ neve≥ bσ present« Iε thi≤ case¼ ì
though¼ thσ XBIO╙ routine≤ wil∞ bσ availablσ anΣ thesσ mus⌠ bσ ì
useΣ instead¼ a≤ therσ i≤ n∩ wa∙ oµ automaticall∙ determininτ ì
keyboarΣ i≤ beinτ used« Wheε thσ routine≤ supplieΣ b∙ XBIO╙ arσ ì
inadequate¼ ß solutioε i≤ t∩ usσ thσ CCP┌ versioε oµ CP/═ a≤ thσ ì
operatinτ system¼ anΣ iµ you≥ prograφ i≤ t∩ bσ generall∙ ì
distributed¼ t∩ distributσ thσ disδ witΦ CCP┌ installed.
Thσ followinτ codσ i≤ aε example¼ then¼ oµ ho≈ t∩ ì
tes⌠ fo≥ thσ ne≈ 256TC keyboard in a non-shell environment
;-----------------------<CHECK if 256TC>------------------------
rom_end equ 0EFFFh
is_256TC:
; Routine to test which keyboard is being used.
; Z indicates new keyboard, NZ indicates the old.
; Corrupts AF.
push hl
ld hl,rom_end-2
ld a,'2'
cp (hl)
jr nz,not256
inc hl
ld a,'5'
cp (hl)
jr nz,not256
inc hl
ld a,'6'
cp (hl)
not256: pop hl
ret
No≈ tha⌠ i⌠ ha≤ beeε determineΣ whicΦ keyboarΣ i≤ beinτ ì
used¼ i⌠ i≤ no≈ possiblσ t∩ writσ routine≤ t∩ actuall∙ scaε thσ ì
two keyboards.
Thσ ne≈ keyboarΣ caε bσ useΣ iε onσ oµ ways« Firstly¼ i⌠ ì
caε bσ programmeΣ t∩ generatσ interrupt≤ wheε ß ke∙ i≤ presseΣ ì
or¼ secondly¼ i⌠ caε bσ polleΣ anΣ reaΣ wheε required.
Thσ ne≈ keyboarΣ use≤ tw∩ softwarσ ports¼ por⌠ ▓ bi⌠ ▒ anΣ ì
por⌠ 18h¼ ╕ paralle∞ bits.
Wheε ß ke∙ i≤ presseΣ o≥ released¼ bi⌠ ▒ oµ por⌠ ▓ wil∞ ì
remaiε se⌠ unti∞ ß reaΣ froφ por⌠ 18Φ i≤ made« Wheε bi⌠ ▒ goe≤ ì
high¼ anΣ bi⌠ ▒ i≤ programmeΣ t∩ generatσ aε interrupt¼ theε thσ ì
keyboarΣ caε bσ reaΣ b∙ thσ interrup⌠ routine« Iε thσ polleΣ ì
modσ yo⌡ wai⌠ fo≥ bi⌠ ▒ por⌠ ▓ t∩ g∩ higΦ theε d∩ aε I╬ routinσ ì
froφ por⌠ 18Φ t∩ ge⌠ thσ data« Iε thi≤ way¼ i⌠ differ≤ froφ thσ ì
olΣ keyboard¼ iε tha⌠ thσ ne≈ keyboarΣ report≤ onl∙ ß changσ iε ì
keyboarΣ statu≤ (ie« tha⌠ ß ke∙ ha≤ beeε presseΣ o≥ released⌐ ì
wherea≤ thσ olΣ keyboarΣ report≤ onl∙ whethe≥ ß specifieΣ ke∙ i≤ ì
dowε o≥ not.è
Aε examplσ oµ codσ t∩ ge⌠ raw datß froφ thσ keyboarΣ i≤ giveε ì
below
;------------------------<Get KEY DATA>--------------------------
key_data:
╗ Thi≤ routinσ return≤ ßn ┌ flaτ iµ n∩ changσ iε keyboarΣ statu≤
; or an NZ flag and appropriate data in the accumlator otherwise.
; Note: this routine is only suitable for 256TC keyboards.
in a,(2) ; check for change in status
bit 1,a
ret z
in a,(18h) ; get data
ret
Thσ datß returneΣ b∙ thi≤ routinσ i≤ specifiπ t∩ thσ 256TC ì
keyboard« Thσ lo≈ orde≥ ╖ bit≤ (bit≤ ░ t∩ 6⌐ oµ thi≤ datß ì
represen⌠ whicΦ ke∙ ha≤ beeε presseΣ o≥ released« Thσ higΦ bi⌠ ì
(bi⌠ 7⌐ describe≤ whethe≥ o≥ no⌠ thσ ke∙ ha≤ beeε presseΣ o≥ ì
releaseΣ - iµ thσ bi⌠ i≤ se⌠ theε thσ ke∙ ha≤ beeε presseΣ anΣ iµ ì
i⌠ i≤ no⌠ se⌠ theε thσ ke∙ ha≤ beeε released« Thσ lo≈ orde≥ 7-ì
bit code for these keys is given below.
+ | 0 1 2 3 4 5 6 7
| 8 9 A B C D E F
---+-----------------------------------------
00 | F1 ESC TAB BRK [0] [.] SPACE
| F2 1 Q A CAPS BOX INS
10 | F3 2 W S [½] [2] [3] Z
| F4 3 E D [¡] [5] [6] X
20 | F5 4 R F [¬] [8] [9] C
| F6 5 T G [7] [1] [4] V
30 | F7 6 Y H [»] [V] [>] B
| F8 7 U J [<] N
40 | F9 8 I K [^] M
| F10 9 O L COR RET ,
50 | F11 0 P ; DEL ` \ .
| F12 - [ ' = ] /
60 | SHFT
| CTRL
70 | ALT
|
Notes:
* Blanδ entrie≤ iε thσ tablσ arσ no⌠ useΣ anΣ shoulΣ neve≥ bσ ì
áááááencountered.
* Entrie≤ iε squarσ bracket≤ (eg« [1]⌐ represen⌠ key≤ oε thσ ì
ááááánumerica∞ keypaΣ.
* [^]¼ [V]¼ [>]¼ [<]¼ CO╥ represen⌠ u≡ arrow¼ dowε arrow¼ ì
áááááright arrow, left arrow and correct respectively.
Wheε switchinτ t∩ you≥ owε keyboarΣ routine≤ froφ thσ ì
system's¼ keyboarΣ datß i≤ occasionall∙ lef⌠ iε thσ ke∙ buffer« ì
Onσ oµ thσ mos⌠ commoε occurrence≤ oµ thi≤ i≤ wheε transferrinτ ìèfroφ thσ CP/═ commanΣ linσ t∩ you≥ program¼ thσ Carriagσ Returε ì
U≡ codσ (4Eh⌐ i≤ no⌠ reaΣ b∙ CP/═ anΣ i≤ lef⌠ iε thσ buffe≥ t∩ bσ ì
reaΣ b∙ you≥ prograφ later« Iµ thi≤ present≤ ß probleφ t∩ thσ ì
smootΦ runninτ oµ you≥ program¼ theε i⌠ i≤ wisσ t∩ clea≥ thσ ì
keyboarΣ buffe≥ jus⌠ beforσ thσ firs⌠ scaε oµ thσ keyboarΣ (or¼ ì
wheε usinτ interrupts¼ jus⌠ beforσ reprogramminτ thσ PI╧ - seσ ì
belo≈ fo≥ details)« Thσ followinτ routinσ doe≤ this:
;----------------------<CLEAR KEY BUFFER>------------------------
clr_kbuf:
; Clear the keyboard buffer of all data.
; Corrupts AF.
in a,(2)
and 2
ret z
in a,(18h)
jr clr_kbuf
Replacing Is_Closed
Onσ oµ thσ mos⌠ popula≥ form≤ oµ scanninτ thσ olΣ keyboarΣ ì
wa≤ t∩ usσ ß routinσ popularl∙ knowε a≤ Is_CloseΣ (o≥ ISCLSD)« ì
Thi≤ i≤ als∩ onσ oµ thσ routinσs useΣ iε BASI├ anΣ reside≤ a⌠ ì
A50Ah« Thσ routinσ i≤ repeateΣ here:
;--------------------------<IS_CLOSED>---------------------------
isclsd:
; This routine checks if the key whose code is given in the
; accumulator is being pressed. An NZ flag is returned if it
; is down and a Z flag if it is not. The codes used in this
; routine are identical to those given for the XBIOS function
; kb_test (details above).
; Note:- this routine works only on the old keyboard.
push bc
ld c,a
ld b,a
close1: ld a,12h
out (0Ch),a
ld a,b
rrca
rrca
rrca
rrca
and 3
out (0Dh),a
ld a,13h
out (0Ch),a
ld a,b
rlcaè rlca
rlca
rlca
out (0Dh),a
ld a,1
out (0Bh),a
ld a,10h
out (0Ch),a
in a,(0Dh)
la52f: ld a,1Fh
out (0Ch),a
out (0Dh),a
la535: in a,(0Ch)
bit 7,a
jr z,la535
in a,(0Ch)
cpl
bit 6,a
ld a,0
out (0Bh),a
ld a,c
pop bc
ret
T∩ emulatσ thi≤ routinσ oε thσ 256TC keyboarΣ ß lonτ anΣ ì
cumbersomσ routinσ mus⌠ bσ written¼ sincσ thσ naturσ oµ thσ tw∩ ì
keyboard≤ i≤ fundamentall∙ differen⌠ (ie« thσ olΣ keyboarΣ ì
report≤ oε aε individua∞ key≤ statu≤ wherea≤ thσ ne≈ keyboarΣ ì
report≤ oε change≤ iε thσ statu≤ oµ key≤ a≤ the∙ occur)« ì
However¼ sucΦ ß codσ ha≤ beeε writteε anΣ i≤ giveε herσ a≤ aε ì
example« Thi≤ particula≥ emulatioε i≤ adapted froφ thσ Autoboo⌠ ì
BASIC.
;---------------------<IS_CLOSED for 256TC>----------------------
isclsd:
; Routine to emulate isclsd on old keyboards.
; Note that this routine works only for 256TC keyboards.
; Also provided is case, which contains the status of the
; SHIFT, ALT and CTRL keys in bits 2, 1 and 0 respectively
; at the time of the last call to isclsd.
push bc
push de
push hl
ld b,a
call key_3 ; * (these lines removed in in-
ld a,b ; * terrupt version, see below)
cp 3Fh ; SHIFT?
jr z,tishift
cp 39h ; CTRL?
jr z,tisctrl
cp 40h ; ALT?
jr z,tisalt
cp 64h
jr nc,tistbigè cp 20h
jr c,tnorm
cp 30h
jr nc,tnorm
sub 20h
add a,a ; check exceptions table
ld hl,itt_ex
ld e,a
ld d,0
add hl,de
ld a,(hl)
inc a
jr z,isret
call ischck
jr nz,isret
inc hl
jr chk2nd
tnorm║ lΣ hl,ittab∞ ╗ conver⌠ t∩ natura∞ 256T├ codes
ld e,a
ld d,0
add hl,de
chk2nd: ld a,(hl)
inc a
jr z,isret
call ischck
jr isret
tistbig:xor a
jr isret
tishift:ld a,(case)
and 4
jr isret
tisalt: ld a,(case)
and 2
jr isret
tisctrl:ld a,(case)
and 1
isret: ld a,b
pop hl
pop de
push af
pop bc
ld a,c
and 0feh ; scf, ccf
xor 40h ; toggle z flag
ld c,a
push bc
pop af
pop bc
ret
èischck: push hl
dec a
ld hl,isctbl
ld e,a
ld d,0
add hl,de
ld a,(hl)
and 80h
pop hl
ret
key_3: xor a
out (0Bh),a
in a,(2) ;check port 2, bit 1 for key
and 2
ret z
in a,(18h) ;read port 18h for key code
ld d,a
ld hl,case ;check for SHIFT, CTRL, and ALT
res 7,a
cp 67h ;check SHIFT
jr nz,ctrl
bit 7,d ;is SHIFT up or down?
res 2,(hl)
ret z
set 2,(hl)
ret
ctrl: cp 6Fh ;check CTRL
jr nz,alt
bit 7,d ;is CTRL up or down?
res 0,(hl)
ret z
set 0,(hl)
ret
alt: cp 77h ;check ALT
ld a,d ;signal no special key
jr nz,setist ; and return with key code, if not ALT
bit 7,d ;is ALT up or down?
set 1,(hl)
ret nz
res 1,(hl)
ret
setist: ld hl,isctbl ;signal key up/down on isctbl
and 7Fh
push bc
ld c,a
ld b,0
add hl,bc
pop bc
ld a,d
and 80h
res 7,(hl)è ret z
set 7,(hl)
ret
case║ dΓ ░ ╗ inf∩ oε CTRL¼ AL╘ anΣ SHIFT
isctbl: ds 60h,0 ; table of keys down
; table of code conversions from isclsd codes to natural codes
; for the 256TC keyboard (-1 means code not used)
ittabl║ dΓ 5Bh,0Bh,37h,27h,1Bh,1Ah,23h,2Bh
db 33h,42h,3Bh,43h,4Bh,47h,3Fh,4Ah
db 52h,0Ah,22h,13h,2Ah,3Ah,2Fh,12h
db 1Fh,32h,17h,5Ah,56h,5Eh,55h,54h
db -1,-1,-1,-1,-1,-1,-1,-1
db -1,-1,-1,-1,-1,-1,-1,-1
db 1,4Dh,2,0Eh,4Eh,0Dh,3,7
db 46h,-1,35h,3Dh,-1,-1,36h,-1
db -1,0,8,10h,18h,20h,28h,30h
db 38h,40h,48h,50h,58h,1,46h,0Fh
db 54h,3Dh,35h,36h,3,2Ch,25h,26h
db 34h,2Eh,1Dh,1Eh,24h,2Dh,15h,16h
db 1Ch,5,6,14h
; exception table for ittable, for those isclsd codes which
; correspond to two keys on the new keyboard (eg. the code 20h
; corresponds to the 1 key, of which there are two, and whose
; codes are 51h and 5)
itt_ex: db 51h,5,9,2Dh,11h,15h,19h,16h,21h,2Eh
db 29h,1Dh,31h,1Eh,39h,2Ch,41h,25h,49h,26h
db 59h,24h,53h,14h,4Fh,-1,5Dh,1Ch,57h,6
db 5Fh,34h
Often¼ ß morσ effectivσ wa∙ t∩ usσ thσ keyboarΣ i≤ t∩ havσ ì
thσ keyboarΣ drivinτ aε interrupt« Thi≤ i≤ becausσ n∩ keystroke≤ ì
caε bσ los⌠ wheε usinτ thi≤ method¼ a≤ caε happeε occasionall∙ ì
wheε pollinτ thσ keyboarΣ (eg« wheε ß lo⌠ oµ worδ mus⌠ bσ donσ iε ì
betweeε checkinτ thσ keyboard¼ a≤ wheε readinτ froφ o≥ writinτ t∩ ì
disk)« Iε orde≥ t∩ havσ thσ keyboarΣ drivσ aε interrupt¼ wσ mus⌠ ì
reprograφ thσ PI╧ s∩ tha⌠ bi⌠ ▒ oµ por⌠ ▓ trigger≤ aε interrupt« ì
Also¼ wσ mus⌠ se⌠ u≡ tw∩ interrup⌠ vector≤ a⌠ ß convenien⌠ ì
locatioε iε memor∙ t∩ handlσ thσ interrupt≤ wheε the∙ occur« Thσ ì
followinτ piecσ oµ codσ doe≤ this
;--------------------<SET INTERRUPT VECTORS>---------------------
; The interrupt vectors below have been chosen arbitrarily. Any
; convenient memory location will do. Note, however, that both
; interrupt vectors must be contained in the same page of memory,
; ie. the same 100h block.
vect_a equ 4000h ; interrupt vector for PIO port A
vect_b equ vect_a+2 ; interrupt vector for PIO port B
set_int:
; This routine sets up the PIO so that the keyboard drives anè; interrupt.
; Note: this routine works only with the 256TC keyboard.
push af
push bc
push de
push hl
ld hl,eireti ; see new version of key_3, below
ld (vect_a),hl
ld hl,key_3
ld (vect_b),hl
di ╗ disablσ interrupt≤
ld hl,iotabl
do_pio: ld a,(hl)
or a
jr z,enabli
ld b,a
inc hl
ld c,(hl)
inc hl
otir
jr do_pio
enabli: im 2 ; set interrupt mode 2
ld a,HIGH vect_a ╗ or 40h iµ HIG╚ i≤ supporteΣ
ld i,a
ei ; reenable interrupts
pop hl
pop de
pop bc
pop af
ret
; If LOW is not supported on your assembler, substitute
; 0 for LOW vect_a and 2 for LOW vect_b
; Note: HIGH and LOW mean high order and low order 8 bits,
; respectively.
iotabl: db 5,1,LOW vect_a,0CFh,-1,97h,-1
db 5,3,LOW vect_b,-1,9Bh,0B7h,0EDh
db 0
No≈ tha⌠ thσ PI╧ ha≤ beeε reprogrammeΣ t∩ generatσ aε ì
interrup⌠ wheneve≥ ß ke∙ i≤ presseΣ o≥ released¼ somσ change≤ t∩ ì
thσ isclsΣ routinσ mus⌠ bσ madσ t∩ accomodatσ thσ interrupts« ì
Firstly¼ thσ tw∩ line≤ witΦ asterisk≤ iε thei≥ commen⌠ field≤ ì
mus⌠ bσ removeΣ (ie« cal∞ key_│ anΣ lΣ a,b)« Secondly¼ thσ key_│ ì
routinσ mus⌠ bσ slightl∙ altered« Thσ ne≈ versioε oµ thσ key_│ ì
routine is given below
;------------------<KEY_3: INTERRUPT VERSION>--------------------
key_3: push af
push bc
push de
push hl
in a,(2) ;check port 2, bit 1 for keyè and 2
jr z,retk3
in a,(18h) ;read port 18h for key code
ld d,a
ld hl,case ;check for SHIFT, CTRL, and ALT
res 7,a
cp 67h ;check SHIFT
jr nz,ctrl
bit 7,d ;is SHIFT up or down?
res 2,(hl)
jr z,retk3
set 2,(hl)
jr retk3
ctrl: cp 6Fh ;check CTRL
jr nz,alt
bit 7,d ;is CTRL up or down?
res 0,(hl)
jr z,retk3
set 0,(hl)
jr retk3
alt: cp 77h ;check ALT
ld a,d ;signal no special key
jr nz,setist ; and return with key code, if not ALT
bit 7,d ;is ALT up or down?
set 1,(hl)
jr nz,retk3
res 1,(hl)
jr retk3
setist: ld hl,isctbl ;signal key up/down on isctbl
and 7Fh
push bc
ld c,a
ld b,0
add hl,bc
pop bc
ld a,d
and 80h
res 7,(hl)
jr z,retk3
set 7,(hl)
retk3: pop hl
pop de
pop bc
pop af
eireti: ei
reti
.paèSECTION II: Colour and Graphics
Introduction
Thσ 256T├ ha≤ improveΣ vastl∙ ove≥ thσ origina∞ Microbee≤ iε ì
thσ areß oµ graphic≤ capabilities« Thσ 256T├ no≈ support≤ full∙ ì
do⌠ addressablσ unlimiteΣ graphic≤ witΦ ß resolutioε oµ 51▓ b∙ ì
25╢ whils⌠ maintaininτ compatibilit∙ witΦ earlie≥ Microbees« ì
Thi≤ wa≤ firs⌠ introduceΣ iε thσ Premiuφ mode∞ Microbees¼ bu⌠ thσ ì
256TC has added the capability of hardware flashing and inverse.
Thσ sectioε oε Implementatioε iε BASI├, below, i≤ takeε almos⌠ ì
directly from the BASIC manual.
Implementation in MicroWorld BASIC
Previously¼ wσ learneΣ abou⌠ HIRE╙ graphics« Thσ onσ ì
disadvantagσ witΦ thi≤ modσ oµ graphic≤ i≤ tha⌠ wσ eventuall∙ raε ì
ou⌠ oµ graphics« S∩ tha⌠ yo⌡ won'⌠ ruε ou⌠ oµ graphics¼ therσ i≤ ì
ß seconΣ modσ oµ HIRE╙ graphic≤ - HIRES2« Tr∙ thσ prograφ belo≈ ì
(thi≤ prograφ caε bσ founΣ oε thσ accompanyinτ disδ a≤ ì
"PATTERN.MWB").
00100 REM A program that will plot lines all over the screen.
00110 HIRES
00120 FOR X=0 TO 511 : REM Initialise X co-ordinates
00130 PLOTI X,255 TO 511-X,0
00140 NEXT X
00150 END
Thi≤ program¼ usinτ thσ standarΣ HIRE╙ command¼ wil∞ begiε ì
PLOTtinτ diagona∞ line≤ froφ thσ to≡ left-hanΣ corner« Bu⌠ yo⌡ ì
wil∞ seσ tha⌠ wheε yo⌡ ruε thσ program¼ ß graphic≤ erro≥ wil∞ ì
occu≥ afte≥ ß shor⌠ time« Yo⌡ havσ ruε ou⌠ oµ graphics« Thσ ì
solution to this is the HIRES2 command.
B∙ usinτ thσ HIRES▓ command¼ iε placσ oµ thσ HIRE╙ command¼ ì
yo⌡ wil∞ neve≥ ruε ou⌠ oµ graphics« Yo⌡ wil∞ als∩ discove≥ tha⌠ ì
thσ HIRES▓ commanΣ wil∞ givσ yo⌡ ß faste≥ modσ oµ graphic≤ thaε ì
HIRES. Let's change line 110 of our program above to
00110 HIRES2
.cp 7è A≤ yo⌡ caε see¼ thσ entirσ screeε ha≤ beeε filleΣ witΦ ì
graphic≤ (thσ patterε i≤ ß resul⌠ oµ usinτ thσ PLOT╔ statemen⌠ ì
insteaΣ oµ ß PLOT)« Al∞ graphic≤ relateΣ function≤ ma∙ bσ useΣ ì
unde≥ HIRES▓ withou⌠ affectinτ thei≥ operation« Thσ onl∙ poin⌠ ì
t∩ notσ i≤ tha⌠ iµ yo⌡ usσ HIRES2¼ you≥ program≤ ma∙ no⌠ ruε (a≤ ì
ß resul⌠ oµ lacδ oµ graphics⌐ oε standarΣ non-Premiuφ serie≤ ì
Microbees.
Hardware changes for the Premium series and 256TC.
EacΦ Premiuφ serie≤ anΣ 256T├ Microbeσ ha≤ eigh⌠ 2δ bank≤ oµ ì
PC╟ ram¼ onσ 2δ banδ oµ characte≥ ram¼ onσ 2δ banδ oµ colou≥ raφ ì
anΣ onσ 2δ banδ oµ attributσ ram (you≥ Microbeσ ha≤ thσ potentia∞ ì
fo≥ 32δ oµ PC╟ ram¼ anΣ 8δ eacΦ oµ colour¼ cahracte≥ anΣ ì
attributσ ram¼ al∞ iε 2δ banks).
Thi≤ mean≤ tha⌠ eacΦ Premiuφ serie≤ anΣ 256T├ Microbeσ ha≤ ß ì
tota∞ oµ 22δ oµ screen¼ PC╟ anΣ colou≥ ram« However¼ al∞ oµ thi≤ ì
raφ lie≤ betweeε F000Φ anΣ FFFFh¼ whicΦ mean≤ onl∙ 4δ i≤ ì
addressablσ a⌠ once« S∩ ho≈ d∩ yo⌡ fi⌠ 22δ oµ memor∙ int∩ ß 4δ ì
memor∙ space┐ You≥ Microbeσ use≤ ß methoΣ oµ banδ switchinτ t∩ ì
switcΦ betweeε eacΦ oµ thσ 2δ bank≤ int∩ memor∙ a≤ i⌠ i≤ needed« ì
Thus, we can select pages of memory as needed.
The Video Memory Latch
Thσ VM╠ (Vide∩ Memor∙ Latch⌐ act≤ a≤ ß 'traffiπ copº fo≥ thσ ì
vide∩ ram« I⌠ i≤ responsiblσ fo≥ determininτ whicΦ banδ oµ raφ ì
i≤ currentl∙ 'latchedº int∩ memory« B∙ settinτ thσ appropriatσ ì
bi⌠ oµ thσ VM╠ (usinτ aε OU╘ statement)¼ wσ arσ ablσ t∩ selec⌠ ì
thσ PC╟ banδ t∩ bσ programmed¼ selec⌠ thσ attributσ raφ o≥ selec⌠ ì
thσ colou≥ ram« Thσ latcΦ i≤ selecteΣ b∙ usinτ aε OU╘ 28,X+12╕ ì
statement¼ wherσ ╪ i≤ ß decima∞ value¼ selectinτ eithe≥ ß PCG¼ ì
attribute¼ colou≥ o≥ characte≥ bank« Yo⌡ mus⌠ als∩ adΣ 12╕ t∩ ì
thσ banδ numbe≥ oµ thσ VM╠ t∩ enablσ thσ additiona∞ bank≤ t∩ bσ ì
selected.
The Attribute RAM
Apar⌠ froφ thσ VML¼ thσ attributσ raφ i≤ thσ mos⌠ importan⌠ ì
sectioε oµ thσ vide∩ circuitr∙ oε thσ Premiuφ series« I⌠ i≤ ì
latcheΣ int∩ memory¼ betweeε location≤ F000h-F7FFh¼ usinτ aε OU╘ ì
28,144« Thi≤ statemen⌠ wil∞ als∩ se⌠ bi⌠ ╖ oµ thσ VM╠ (banδ ì
select mode) high.
.cp 6è EacΦ bytσ oµ thσ attributσ raφ determine≤ whicΦ banδ oµ PC╟ ì
raφ i≤ selecteΣ fo≥ thσ correspondinτ positioε oε thσ screen« ì
Fo≥ example¼ let'≤ supposσ tha⌠ wσ havσ programmeΣ thσ characte≥ ì
'Rº witΦ PC╟ characte≥ iε banδ ╢ oµ thσ PC╟ ram« Iµ wσ wan⌠ t∩ ì
prin⌠ tha⌠ characte≥ a⌠ curso≥ positioε 1¼ wσ wil∞ neeΣ t∩ latcΦ ì
thσ attributσ raφ anΣ POK┼ thσ valuσ ╢ int∩ locatioε F000Φ (thσ ì
firs⌠ positioε oε thσ screen)« Wheε wσ attemp⌠ t∩ PRIN╘ thi≤ ì
character¼ BASI├ reset≤ thσ attributσ raφ t∩ banδ 0¼ s∩ wσ wil∞ ì
havσ t∩ POK┼ thσ attributσ raφ afte≥ thσ PRIN╘ statement« Thσ ì
following program is an example ("GREEK.MWB" on the disk).
00100 REM A demonstration of PCG programming with the
00110 REM Premium series and 256TC Microbees.
00120 REM This program will print three different Greek
00130 REM alphabetic characters onto the screen,
00140 REM utilising banks 0-2 of the PCG ram.
00150 IN#0 OFF : REM Turn the keyboard off.
00160 REM GOSUB to poke the PCG data into ram.
00170 GOSUB 380
00200 REM Beginning of main program
00210 CLS
00220 REM Enter PCG mode & print characters on screen.
00230 PCG
00240 PRINT "A"
00250 PRINT "A"
00260 PRINT "A"
00270 OUT 28,144 : REM Latch attribute ram via VML.
00280 POKE 61440,0 : REM Set screen pos 1 for bank #0
00290 POKE 61504,1 : REM Set screen pos 2 for bank #1
00300 POKE 61568,2 : REM Set screen pos 3 for bank #2
00310 NORMAL
00320 IN#0 ON : REM Turn keyboard on.
00330 END
00340 REM Subroutine to program PCG
00350 DATA 0,0,0,0,0,7,42,68,68,42,17,0,0,0,0,0
00360 DATA 0,0,73,73,73,42,28,8,8,28,0,0,0,0,0,0
00370 DATA 255,65,34,16,8,4,2,1,1,2,4,8,16,34,65,255
00380 FOR J=0 TO 2
00390 OUT 28,J+128 : REM Latch bank #J
00400 FOR I=64528 TO 64543
00410 READ D
00420 POKE I,D
00430 NEXT I
00440 NEXT J
00450 RETURN
Let'≤ spli⌠ thi≤ prograφ dowε int∩ sections« Thσ PC╟ ì
routinσ i≤ locateΣ betweeε 34░ anΣ 450« Pleasσ notσ tha⌠ wσ arσ ì
programminτ thσ characte≥ 'Aº threσ times¼ bu⌠ wσ arσ POKEinτ ì
theφ int∩ differen⌠ bank≤ b∙ usinτ thσ OU╘ 28,J+12╕ statement.
Thσ firs⌠ statemen⌠ t∩ usσ witΦ an∙ prograφ tha⌠ i≤ usinτ ì
thσ extrß PC╟ banks¼ i≤ aε IN#▒ OF╞ (linσ 150⌐ t∩ turε thσ ì
keyboarΣ off« BASI├ continuosl∙ scan≤ thσ keyboarΣ t∩ checδ iµ ì
thσ BREA╦ ke∙ ha≤ beeε pressed« Wheε ß scaε occur≤ thσ VM╠ i≤ ìèrese⌠ anΣ s∩ an∙ bank≤ tha⌠ yo⌡ havσ latched (othe≥ thaε PC╟ ì
banδ 0⌐ wil∞ bσ de-latched« Aε IN#░ OF╞ mus⌠ bσ useΣ t∩ sto≡ ì
this happening.
Thσ maiε prograφ i≤ locateΣ betweeε line≤ 210-330« Thσ ì
importan⌠ poin⌠ herσ i≤ tha⌠ thσ character≤ arσ PRINTeΣ BEFOR┼ ì
thσ attributσ raφ i≤ POKEΣ witΦ necessar∙ banδ selec⌠ data« Thσ ì
reasoε fo≥ thi≤ i≤ tha⌠ wheε BASI├ use≤ ß PRIN╘ statement¼ i⌠ ì
wil∞ rese⌠ thσ attributσ ram¼ anΣ s∩ al∞ attribute≤ wil∞ bσ se⌠ ì
t∩ PC╟ banδ 0« Thus¼ thσ character≤ a⌠ location≤ 64528-6454│ ì
wil∞ bσ printeΣ first¼ anΣ theε thσ attributσ raφ i≤ theε POKEΣ ì
witΦ thσ correc⌠ banδ selec⌠ data« Iµ yo⌡ usσ ß SPEE─ 25╡ ì
commanΣ beforσ RUNninτ thσ program¼ yo⌡ wil∞ bσ ablσ t∩ seσ thi≤ ì
happening« A⌠ norma∞ speed¼ yo⌡ wil∞ no⌠ bσ ablσ t∩ sensσ thσ ì
change in characters.
The Colour Commands
MicroWorlΣ BASI├ ha≤ ß widσ se⌠ oµ colou≥ commands« Fo≥ thσ ì
Premiuφ serie≤ anΣ 256T├ user¼ colou≥ i≤ standard« Eveε iµ yo⌡ ì
intenΣ t∩ usσ you≥ program≤ oε Microbee≤ tha⌠ don'⌠ usσ thσ ì
colou≥ facility¼ i⌠ i≤ stil∞ allowablσ t∩ havσ colou≥ command≤ iε ì
you≥ program« Thσ use≥ ma∙ selec⌠ ß colou≥ fo≥ thσ foregrounΣ o≥ ì
thσ background« EacΦ colou≥ ha≤ ß numbe≥ o≥ lette≥ (dependinτ oε ì
whethe≥ i⌠ i≤ ß foregrounΣ o≥ backgrounΣ colour⌐ associateΣ witΦ ì
it. The basic forms of the colour commands are:
.cp 3
COLOUR n (n = 0 to 15)
COLOURB n (n = 0 to 15)
COLOUR n (n = 0 to 255)
COLOU╥ ε wil∞ se⌠ thσ foregrounΣ colour¼ whilσ COLOUR┬ ε ì
wil∞ se⌠ thσ backgrounΣ colou≥ (wσ wil∞ seσ ho≈ t∩ usσ thσ thirΣ ì
forφ oµ thσ COLOU╥ commanΣ iε ß moment)« S∩ let'≤ experimentí ì
Try this simple program ("RONW.MWB"):
00100 COLOUR 1 : COLOURB 15
00110 PRINT " Red on White "
00120 COLOUR 2 : COLOURB 0
A≤ yo⌡ ma∙ havσ guessed¼ thσ strinτ "ReΣ oε Whiteó i≤ ì
printeΣ iε reΣ oε ß whitσ background« Thσ usablσ colour≤ anΣ ì
their codes are as follows.
Colour Decimal Code
Black 0
Red 1
Green 2
Brown 3
Blue 4
Magenta 5
Cyan 6è Light Grey 7
Dark Grey 8
Light Red 9
Light Green 10
Yellow 11
Light Blue 12
Light Magenta 13
Light Cyan 14
White 15
T∩ accoun⌠ fo≥ differen⌠ spelling≤ oµ thσ worΣ "colour"¼ ì
MicroWorlΣ BASI├ wil∞ accep⌠ thσ word≤ COLOU╥ o≥ COLOR« Iε somσ ì
instances¼ i⌠ i≤ desirablσ t∩ usσ thσ COLO╥ keyword¼ a≤ thi≤ ì
version of the word is more efficient in terms of memory.
I⌠ i≤ onl∙ possiblσ t∩ se⌠ thσ foregrounΣ anΣ backgrounΣ ì
colour≤ oε ß characte≥ b∙ characte≥ basis« Wheε usinτ thσ PC╟ ì
t∩ producσ graphics¼ i⌠ i≤ ß gooΣ ideß t∩ retaiε thσ samσ ì
background colour as selected when the HIRES command was invoked.
Thσ followinτ prograφ demonstrate≤ thσ differenc⌠ betweeε ì
thσ standarΣ anΣ 'lightº colours« Thσ prograφ wil∞ displa∙ al∞ ì
the background colours ("COLOURB.MWB").
00100 REM A program to demonstrate Microbee colours
00110 FOR A=1 TO 15 : REM loop for background colours
00120 COLOURB A : REM set background colour
00130 CLS : REM fill screen with colour
00140 FOR B=1 TO 1000 : NEXT B : REM A short delay
00150 NEXT A
00160 END
Advanced Colour Programming in BASIC
MicroworlΣ BASI├ no≈ allow≤ thσ use≥ t∩ se⌠ botΦ foregrounΣ ì
AN─ backgrounΣ colour≤ witΦ thσ samσ command« Thi≤ i≤ possiblσ ì
b∙ redefininτ thσ decima∞ codσ fo≥ thσ backgrounΣ colou≥ anΣ theε ì
addinτ theφ t∩ thσ foregrounΣ colou≥ codes« Thσ redefineΣ ì
background colour codes are as follows:
Background colour Decimal Code
Black 0
Red 16
Green 32
Brown 48
Blue 64
Magenta 80
Cyan 96
Light Grey 112
Dark Grey 128
Light Red 144
Light Green 160è Yellow 176
Light Blue 192
Light Magenta 208
Light Cyan 224
White 240
So, the lines
COLOUR 207 <cr>
followed by
CLS <cr>
wil∞ produceΣ whitσ character≤ oε ß ligh⌠ bluσ background« ì
Thσ ne≈ codσ fo≥ backrounΣ ligh⌠ bluσ i≤ 192« Thσ foregrounΣ ì
white is 15. Thus, if we perform the simple equation:
192
+ 15
we arrive at the answer:
207.
Yo⌡ ma∙ onl∙ usσ thi≤ forφ oµ thσ colou≥ commanΣ wheε ì
settinτ BOT╚ backgrounΣ anΣ foregrounΣ colours« Iµ wσ werσ t∩ ì
try to set the background colour to yellow by using the command:
COLOURB 176 <cr>
the screen colour won't change. However, using
COLOUR 176 <cr>
wσ caε changσ thσ backgrounΣ colou≥ t∩ yello≈ witΦ ß blacδ ì
foregrounΣ (17╢ ½ 0)« Thσ followinτ prograφ wil∞ displa∙ ever∙ ì
possiblσ colou≥ combinatioε avaiblσ witΦ thσ Microbeσ ì
("ADVCOL.MWB").
00100 FOR C=1 TO 255 : REM Ignore black on black
00110 COLOUR C
00120 SPEED 100 : REM Set speed
00130 PRINT " *********** "
00140 NEXT C
00150 COLOUR 2 : REM Reset colour to green on black
00160 SPEED 0 : REM Reset speed
00170 END
A≤ yo⌡ ma∙ havσ alread∙ noticed¼ eacΦ colou≥ combinatioε ì
wil∞ havσ it'≤ owε uniquσ code« I⌠ i≤ impossiblσ fo≥ tw∩ ì
differen⌠ colou≥ combination≤ t∩ havσ thσ samσ code« Iµ ├ wa≤ ì
eve≥ t∩ reacΦ thσ valuσ oµ 256¼ i⌠ woulΣ bσ rese⌠ t∩ ░ (blacδ oε ì
black).
.cp 8èImplementation in Machine Language
Implementinτ thσ ne≈ extendeΣ graphic≤ facilitie≤ iε machinσ ì
languagσ i≤ ß direc⌠ adaptatioε oµ thσ technique≤ useΣ iε BASIC¼ ì
describeΣ above« Thσ Vide∩ Memor∙ LatcΦ (por⌠ 1Ch⌐ i≤ useΣ t∩ ì
switcΦ betweeε characte≥ anΣ attributσ raφ anΣ betweeε thσ eigh⌠ ì
bank≤ oµ PC╟ ram«
Colou≥ i≤ programmeΣ b∙ usinτ por⌠ 8« Settinτ bi⌠ 6 oµ thi≤ ì
por⌠ wil∞ causσ thσ colou≥ raφ t∩ switcΦ iε a⌠ F800Φ anΣ ì
resettinτ bi⌠ 6 wil∞ causσ i⌠ t∩ switcΦ ou⌠ again« EacΦ bytσ iε ì
thσ colou≥ raφ correspond≤ t∩ thσ equivalen⌠ bytσ iε thσ ì
characte≥ ram¼ iε thσ samσ wa∙ a≤ thσ attributσ ram« Thus¼ F83FΦ ì
iε thσ colou≥ raφ represent≤ thσ colou≥ oµ thσ characte≥ a⌠ ì
F03Fh¼ thσ to≡ right-hanΣ corne≥ oµ thσ screen« Thσ colou≥ code≤ ì
fo≥ thσ colou≥ raφ arσ thσ samσ a≤ fo≥ thosσ thσ basiπ statemen⌠ ì
COLOUR n (n=0 to 255).
Oε thσ disδ provided¼ thσ prograφ QUIX.CO═ anΣ it≤ ì
associateΣ sourcσ filσ QUIX.MA├ providσ ß usefu∞ examplσ oµ ho≈ ì
graphic≤ anΣ colou≥ caε bσ useΣ iε ß 'stand-aloneº machinσ ì
languagσ application« Somσ oµ thσ usefu∞ routine≤ adapteΣ froφ ì
thi≤ prograφ arσ given below.
Firstly¼ ß rougΦ equivalen⌠ oµ thσ HIRES▓ commanΣ iε ì
BASI├ wil∞ bσ presented« Bu⌠ beforσ thi≤ wσ havσ t∩ determinσ ì
whethe≥ o≥ no⌠ thσ systeφ thσ prograφ i≤ runninτ oε i≤ ß Premiuφ ì
or TC256. The following routine determines this
;-----------------------<EXAMINE SYSTEM>-------------------------
screen equ 0F000h ; char and att memory
grafix equ 0F800h ; PCG and colour memory
vmlatch equ 1Ch ; video memory latch port
attrib equ 144 ; attribute switch
c_port equ 8 ; colour port
c_swtch equ 40h ; colour port switch
row equ 64 ; no of characters per row
examine:
; This routine examines the system to determine whether it
; (i) has colour (if not, colour is set to -1)
; (ii) is a Premium (if not, prmium is set to -1) and
; {iii} is a 256TC (if not, tc256 is set to -1)
╗ Note║ iµ thσ systeφ i≤ ß Premium¼ theε i⌠ i≤ als∩ colour¼ and
; if it is a 256TC, then it is also a Premium and colour, for
; the purposes of this routine.
; Corrupts AF and HL.
call is_256TC ; see above for this routine
ret z
ld a,-1
ld (tc256),a
ld hl,screen+32*row-1
ld (hl),0è ld a,attrib
out (vmlatch),a
ld (hl),-1
ld a,80h
out (vmlatch),a
ld a,(hl)
ld (prmium),a
or a
ret z
ld hl,grafix+32*row-1
ld (hl),0
ld a,c_swtch
out (c_port),a
ld (hl),7
xor a
out (c_port),a
ld a,(hl)
or a
ret z
ld a,-1
ld (colour),a
ret
colour: db 0 ; 0 = colour
prmium: db 0 ; 0 = Premium series or later
tc256: db 0 ; 0 = 256TC
No≈ tha⌠ wσ caε determinσ whethe≥ o≥ no⌠ thσ systeφ i≤ ì
Premium series or later, we can now use the HIRES2 routine.
;--------------------<SET SCREEN to HIRES2>----------------------
initcol equ 2 ; green on black
set_scn:
; Set up the screen in a rough equivalent to the HIRES2 command
; of MicroWorld BASIC. Clears the screen, sets 64x16 video mode
╗ set≤ thσ screeε colou≥ t∩ initco∞ anΣ fill≤ thσ screeε froφ
; left to right, top to bottom with PCG, starting in the top left
; with character 80h, bank 0, and ending in the bottom right with
; character FFh, bank 7.
; Corrupts all registers.
; Returns c flag if error (ie. not Premium)
ld a,(prmium) ; see examine routine above
or a
scf
ret z
ld hl,screen ; clear the screen
ld (hl),' '
ld de,screen+1
ld bc,32*row-1
ldir
call reform ; set 64x16 mode
ld bc,0
rfwait: dec bcè ld a,b
or c
jp nz,rfwait
ld b,8
ld a,80h
clgrfx: push bc
out (vmlatch),a
ld hl,grafix
ld (hl),0
ld de,grafix+1
ld bc,128*char
ldir
inc a
pop bc
djnz clgrfx
ld a,c_swtch ; set up initial screen colour
out (c_port),a
ld hl,grafix
ld (hl),initcol
ld de,grafix+1
ld bc,16*row-1
ldir
xor a
out (c_port),a
ld b,8 ; set up screen & attributes
ld hl,screen
ld de,screen+1
ld a,attrib
out (vmlatch),a
xor a
setatt: push bc
ld bc,2*row
ld (hl),a
ldir
inc a
pop bc
djnz setatt
ld a,80h
out (vmlatch),a
ld hl,screen
ld c,8
setscn: ld b,2*row
ld a,80h
setrow: ld (hl),a
inc a
inc hl
djnz setrow
dec c
jr nz,setscn
re⌠ ╗ π flaτ i≤ rese⌠
reform: ld hl,v_64+15 ; routine to set up 64*16
refrm2: push bc
push hl
ld b,10hèformat: ld a,b
dec a
out (0ch),a
ld a,(hl)
out (0dh),a
dec hl
djnz format
ld b,4Bh
call leee3
pop hl
pop bc
ret
leee3: push hl ; routine for 64*16
leee4: ld hl,007Ah
leee7: dec hl
ld a,h
or l
jr nz,leee7
djnz leee4
pop hl
ret
v_64: db 6Bh,64,51h,37h,12h,9,16,12h,48h,0Fh,2Fh,0Fh,0,0,0,0
Thσ othe≥ routinσ oµ possiblσ interes⌠ i≤ ß fas⌠ line-ì
drawinτ routinσ (line)« Thi≤ i≤ giveε below
;------------------------<LINE DRAWING>--------------------------
line:
; This routine is used in conjunction with hires2 above and
; draws a straight line from (from_x, from_y) to (to_x, to_y).
; Corrupts all registers, including IY and alternative regs.
call calcxy
ex af,af'
ld a,(set)
ex af,af'
ld hl,(from_x)
ld de,(to_x)
call subabs
ld b,h
ld c,l
ld hl,pix_lt
jp nc,cupok
ld hl,pix_rt
cupok: ld (vect_1),hl
ld hl,(from_y)
ld de,(to_y)
call subabs
ld d,h
ld e,l
ld hl,pix_up
jp nc,crtok
ld hl,pix_dnècrtok: ld (vect_2),hl
ld h,b
ld l,c
or a
sbc hl,de
jp nc,swaphd
ld hl,(vect_1)
ld iy,(vect_2)
ld (vect_2),hl
ld (vect_1),iy
ld h,b
ld l,c
ex de,hl
ld b,h
ld c,l
swaphd: push bc
push bc
ld hl,0
srl b
rr c
or a
sbc hl,bc
push hl
pop iy
dec iy
pop bc
ld hl,0
or a
sbc hl,bc
ld b,h
ld c,l
pop hl
ld a,h
or l
jr z,conend
smline: exx
call c_plot
smmove: call pix_rt
exx
add iy,de
jp nc,endmov
add iy,bc
exx
bgmove: call pix_dn
exx
endmov: dec hl
ld a,h
or l
jp nz,smline
conend: exx
call c_plot
exx
ret
vect_1 equ smmove+1èvect_2 equ bgmove+1
calcxy: exx
lΣ hl,(from_x⌐ ╗ calculatσ initia∞ datß fo≥ linσ
ld a,7
and l
ld b,a
ld a,80h
jr z,noshft
shftpx: srl a
djnz shftpx
noshft: ld c,a
ld a,0F8h
and l
ld l,a
add hl,hl
ex de,hl
ld hl,(from_y)
ld a,15
and l
ld b,a
ld a,0E0h
and l
rlca
rlca
rlca
ld (bank),a
or 80h
out (vmlatch),a
bit 4,l
ld l,b
ld h,0
jr z,hlfblk
ld h,4
hlfblk: add hl,de
ld de,grafix
add hl,de
exx
ret
╗ Thσ nex⌠ tw∩ routine≤ se⌠ anΣ rese⌠ thσ pixe∞ a⌠ thσ curren⌠
; location
c_plot: ex af,af'
or a
jp z,creset
ex af,af'
ld a,c
or (hl)
ld (hl),a
ret
creset: ex af,af'
ld a,c
or (hl)è xor c
ld (hl),a
ret
╗ Thσ followinτ routines¼ pix_lt¼ pix_rt¼ pix_up¼ pix_dn¼ movσ
╗ thσ curren⌠ pixe∞ locatioε left¼ right¼ u≡ anΣ dowε
; respectively
pix_lt: sla c
ret nc
ld c,1
ld de,-char
add hl,de
ret
pix_rt: srl c
ret nc
ld c,80h
ld de,char
add hl,de
ret
pix_up: ld a,b
or a
jr z,chr_up
dec b
dec hl
ret
chr_up: ld de,char-1
ld b,e
add hl,de
ld a,4
xor h
ld h,a
bit 2,h
ret z
ld a,(bank)
dec a
ld (bank),a
or 80h
out (vmlatch),a
ret
pix_dn: ld a,b
inc a
cp char
jr nc,chr_dn
ld b,a
inc hl
ret
chr_dn: xor a
ld b,a
ld de,-char+1è add hl,de
ld a,4
xor h
ld h,a
bit 2,h
ret nz
ld a,(bank)
inc a
ld (bank),a
or 80h
out (vmlatch),a
ret
subabs: ld a,h ;perform absolute of hl - de
cp d
jp c,abshls
jp nz,absdes
ld a,l
cp e
jp c,abshls
absdes: or a
sbc hl,de
ret
abshls: ex de,hl
or a
sbc hl,de
scf
ret
from_x: dw 0
from_y: dw 0
to_x: dw 0
to_y: dw 0
bank: db 0
set: db 0
Hardware Flashing and Inverse
Finally¼ ß notσ oε thσ tw∩ ne≈ feature≤ iε thσ 256TC'≤ ì
graphics, hardware flashing and inverse.
┴ characte≥ oε thσ screeε caε bσ madσ t∩ flasΦ b∙ settinτ ì
bi⌠ ╖ oµ it≤ correspondinτ bytσ iε thσ attributσ ram« Similarly¼ ì
ß characte≥ caε bσ inverteΣ b∙ settinτ bi⌠ ╢ oµ thσ correspondinτ ì
byte in the attribute ram.
.cp 8è Fo≥ aε examplσ oµ thi≤ iε MicroWorlΣ BASIC¼ wσ wil∞ alte≥ ì
thσ abovσ examplσ prograφ whicΦ deal⌠ witΦ demonstratinτ thσ ì
attributσ raφ anΣ PC╟ bank≤ ("GREEK.MWB")« Changσ line≤ 280-30░ ì
to
00280 POKE 61440,64 : REM Set screen pos 1 to bank 0 + inverse
00290 POKE 61504,129 : REM Set screen pos 2 to bank 1 + flashing
00300 POKE 61568,198 : REM Screen pos 3 to bank 2 + inv + flash
Yo⌡ wil∞ noticσ thσ to≡ characte≥ i≤ inverted¼ thσ middlσ ì
characte≥ flashes¼ anΣ thσ bottoφ characte≥ i≤ inverteΣ anΣ als∩ ì
flashes.
.paèSECTION III : Using ZBASIC
T∩ bσ founΣ oε thσ accompan∙ disδ i≤ thσ filσ ZBASIC.COM« ì
ZBASI├ i≤ ß versioε oµ MicroWorlΣ BASI├ v6.22σ whicΦ wil∞ worδ ì
unde≥ an∙ operatinτ systeφ o≥ shel∞ anΣ oε an∙ microbee« I⌠ ì
automaticall∙ detect≤ whicΦ compute≥ anΣ operatinτ systeφ i⌠ i≤ ì
runninτ oε anΣ change≤ it≤ routine≤ accordingly« I⌠ doe≤ thi≤ a⌠ ì
thσ expensσ oµ threσ standarΣ BASI├ commands║ EDIT¼ G╪ anΣ RENUM« ì
Sincσ thesσ command≤ ver∙ rarel∙ appea≥ iε BASI├ programs¼ thi≤ ì
shoulΣ presen⌠ n∩ problem.
ZBASI├ als∩ ha≤ thσ abilit∙ t∩ loaΣ anΣ ruε BASI├ program≤ ì
froφ thσ CP/═ commanΣ line« Thi≤ enable≤ thσ programme≥ t∩ usσ ì
thσ auto-executσ featurσ oµ CP/═ t∩ automaticall∙ loaΣ u≡ thσ ì
BASI├ prograφ hσ want≤ wheε bootinτ (eg« settinτ thσ auto-executσ ì
commanΣ usinτ CONFI╟ t∩ ZBASI├ MENU.MW┬ wil∞ loaΣ anΣ ruε thσ ì
prograφ "MENU.MWBó ever∙ timσ thσ disδ i≤ booted).
Als∩ oε thσ disδ i≤ thσ filσ CCPZGEN.COM« Thi≤ prograφ wil∞ ì
generatσ aε imagσ oµ thσ CCP┌ versioε oµ CP/═ ont∩ thσ requireΣ ì
disk¼ iε exactl∙ thσ samσ wa∙ a≤ doe≤ SYSGEN« Thσ CCP┌ operatinτ ì
systeφ i≤ ß barσ bone≤ versioε oµ CP/═ (withou⌠ shells¼ etc.⌐ bu⌠ ì
i⌠ wil∞ worδ oε an∙ existinτ microbee« Hence¼ iµ yo⌡ wisΦ t∩ ì
distributσ ß disδ witΦ aε operatinτ systeφ alread∙ installed¼ ì
theε CCP┌ shoulΣ bσ thσ systeφ used¼ a≤ i⌠ wil∞ alway≤ worδ (thi≤ ì
i≤ technicall∙ illegal¼ however).