Bally_BASIC Bally BASIC

User Manual: Pdf Bally_BASIC

Open the PDF directly: View PDF PDF.
Page Count: 50

*I1ODCOMP
1-80
CROSS
ASSEMBlERi
HOME
VIDEO
GAt1E
SYSTEM
ADDR
OB-JECT
STm
LABEL
opeD
OPERAND
COI1MENT
PAGE
1
642
LIST
S
643
i
***************************
644
i *
BALLY
BASIC
INTERPRETER
*
645
i * *
b46
i *
eCl
JUlY
1978
BALLY
MFG
*
647
i * *
648
i *
WRITIEN
BY:
JAY
FENTON
*
649
; * *
650
i *
BALLY
BASIC
IS
BASED
ON
*
651
i *
PALO
ALTO
TINY
BASIC
BY
*
652
i *
LICHEN
WANG
*
653
; * *
654
i
***************************
655
i
TINY
BASIC
INTERPRETER
656
i
MACROS:
657
TOKEN
MACR
#TINDX,#TGOTO
658
DEFB
iTINDX
659
DEFF
tTGOTO
660
END"
661
DEFF:
MACR
IWORDY
662
DEFB
(iWORDY.
sltt
8)+800
663
DEFB
iWORDY,ANnOFFH
664
ENDM
665
TSTC
"OCR
iCAT,#DOG
666
RST
8
667
DEFB
'iCAT/
668
DEFB
iDOG-$-l
669
END"
670
TSTCC
MACR
iCAT1,
#DOG1
671
RST
8
672
DEFB
iCAT1
673
DEFB
#DOG1-$-1
674
ENDtt
675
ITEM
MACR
iSTRANG,~JUMPTO
676
DEFtt
/#STRANG'
677
DEFF
IJUf'lPTO
678
ENDI'I
)4E20
679
BOTSCR
EOO
04E20H
)4FEF
6.90
TOPSCR
EOO
04FEFH
)AOOQ
'681
BOTRAM
EOO
OAlIOOH
)A70C
682
DFTLMT
EOO
OA70CH
)2000
683
BOTROM
EQIJ
02000H
684
>0012
685
TAPEIO
EOO
12H
i
TAPE
INTERFACE
1-0
PORT
)OOFC
686
STPBCT
EQlJ
OFCH
i
-#
OF
STOP
BIT
WINDOWS
FOR
VALID
DATA
687
>0000
688
CR
EOO
000
)oolF
689
RUBOUT
EQlJ
IFH
>0067
690
NLLN
EOO
67H
691
i
EQUATES
FOR
RESTART
INSTRlJCTIONS
)0010
692
RSTEXP
EOO
16
i
EXPR
)0018
693
RSTOCH
EOO
24
;
OIJTCH
>0020
694
RSTIGN
EQU
32
;
IGNBlK
>0028
695
RSTPAR
EQlJ
40
i
PARN
>0030
696
RSTFIN
EOO
48
i
FINISH
697
698
ORG
BOTSCR
'I
\
ZFfC.
,
*I1ODCOI'IP
1-80
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
ADDR
OBJECT
STMT
LABEL
OPCD
OPERAND
COMMENT
PAGE
2
}4E20
4E20
4E21
4E22
)4E52
4E52
4E54
4E55
4E56
4E57
4E58
4E59
4E5A
4E5B
4E5C
4E5E
4E60
4E62
4E6.'3
4Eb4
4EM
4E6D
4E6E
4EA2
4EM
4EAb
4EAS
4EAA
4EAC
4EAE
4EB0
4EB9
4EC2
4EC3
4EC5
)4EC7
4EC7
4EC9
4ECB
4ECD
4ECf
4EDl
4ED3
4ED4
)4F3C
4F3C
)4F5C
)4FEF
2000
C36724
699
i
TAPE
INPUT
GOODIES
700
CONPRO
£00
$
701
PROPTR:
DEFS
1
702
CONPTR:
DEFS
1
703
TAPBUF:
DEFS
48
704
TBFEND
Eoo
$
705
TXTUNF:
DEFS
2
706
VDMNLF:
DEFS
1
707
KEYTMR:
DEFS
1
708
MUZTMR:
DEFS
1
709
NEWTt1R:
DEFS
1
710
MUZMO:
DEFS
1
711
MUZTON:
DEFS
1
712
SHARPF:
DEFS
1
713
714
PIXVAl:
DEFS
1
715
MNMX:
DEFS
2
716
INCRO:
DEFS
2
717
NLLNLN:
DEFS
2
718
NlLNCT:
DEFS
1
719
NlLNZS:
DEFS
1
720
OlDlN:
DEFS
2
721
722
AlTFON:
DEFS
7
723
KEYTRK:
DEFS
1
724
VARBGN:
DEFS
2*26
725
DEWAR:
726
DEVClO:
DEFS
2
727
DEVCl1:
DEFS
2
728
DEVTEM:
DEFS
2
729
VDMX:
DEFS
2
730
VDMV:
DEFS
2
731
OlDXV:
DEFS
2
732
REMAIN:
DEFS
2
733
SCMi:
OEFS
9
734
BCnA2:
DEFS
9
735
TAPEST:
DEFS
1
736
CURRNT:
DEFS
2
737
STKGOS:
DEFS
2
738
VARNXT
EQU
$
739
STKINP:
DEFS
2
740
LOPVAR:
DEFS
2
741
LOPINC:
DEFS
2
742
LOPlMT:
DEFS
2
743
LOPLN:
DEFS
2
744
LOPPT:
DEFS
2
745
DEFS
1
746
BUFFER:
DEFS
104
747
BUFEND
Eoo
$
748
DEFS
32
749
ST¥~MT
EQlI
$
750
ORG
TOPSCR
751
STACK
Eoo
$
752
ORG
BOTRAM
7~3
TEXT:
DEFS
2
754
ORG
BOTROM
~S
~~
BEGIN
;
TAG
TO
NAIL
BOTH
;
PRODUCERS
POINTER
i
CONSUMERS
POINTER
i
ROTATING
BUFFER
j 1
PAST
END
OF
BUFFER
i
VOM
NEW
LINE
FLAG
;
r~VBOARD
SCAN
TIMER
j
MUSIC
NOTE
TIMER
i
NEW
MUSIC
TIMER
VAlUE
i
MASTER
OSCILLATOR
;
TONE
VAlUE
;
SHARP-FLAT
FLAG
;
PIXEL
TO
DRAW
VECTOR
WITH
;
MIN
-
I'1AX
DELTAS
FOR
VECTOR
DRAW
i
COORDINATE
INCREMENTS
FOR
VECTOR
DRAW
i
WORKING
copy
OF
LINE
NUMBER
BEING
TYPED
;
AUTO
LINE
I
FlAG-COUNTER
i
AUTO
LINE
NUMBER
ZERO
SURPRESS
FlAG
;
PREVIOUS
LINE
I
TYPED
i
AlTERNATE
FONT
DESCRIPTOR
;
KEYBOARD
TRACKER
i
DEVICE
VARIABLES:
i
BACKGROUND
COlOR
i
FOREGROUND
COlOR
i
TEMPO
i
VDM
X
COORDINATE
i
VOl'!
Y
COORDINATE
;
PREVIOUS
COORDINATES
FROM
VECTOR
DRAW
;
REI'1AINDER
FROM
LAST
DIVIDE
;
FIRST
ARG
AREA
i
SECOND
ARG
AREA
i
TAPE
STATUS
;
**
AUTOSTART
CASSETTE
If
*MOOCOHP
1-80
CRG.SS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
3
ADDR
OBJECT
STMT
LABEL
0pc,1)
OPERAND
COMMENT
2003
80
7S6
PIXTBL:
DEFB
080H
2004
20
757
DEFB
020H
200508
758
DEFB
08H
2006
02
759
DEFB
2H
760
;
TRANSFER
VECTORS
TO
RESTART
ROUTINES
2007
C3512A
761
JP
TSTCH
i *RSTS
200A
C39227
762
JP
EXPR
; I
RST
16
2000
C38C2C
763
JP
OUTCH
i I
RST
24
2010
C37D29
764
.jp
IGNBLK
ifRST32
2013
C39C28
765
.JP
PARN
ifRST40
2016
Fl
766
POP
AF
ifRST48
2017
C3bA29
767
JP
FINISH
201A
C39A2D
768
JP
CHI(IO
; H
LINK
TO
TAPE
READ
ROllTINE
If
769
INITIAL
VALUES
FOR
PARAMETER
VECTOR
201D
0700
770
INIDEV:
DEFW
7 i
BACKGROUND
COLOR
201F
0000
771
DEFW
0 j
FOREGROUND
COLOR
2021
0300
772
DEFW
3 j
MUSIC
TEMPO
2023
B3FF
773
DEFW
-77
;
VDK
X
COORDINATE
20252800
774
DEFW
40
;
VDK
Y
COORDINATE
2027
0000
775
DEFW
0 i
RESET
OLD
X,
Y
FOR
VECTOR
DRAW
771:..
i
ASCII
MESSAC,£S:
2029
42414C4C
777
MS6:
DEFM
'BALLY
BASIC'
2034
00
778
DEFB
CR
2035
57484154
779
WHAT:
DEFM
'WHAT?'
203A
OD
780
DEFB
CR
203B
484FS73F
781
HOW:
DEFM
'HOW?'
203F
OD
782
DEFB
CR
2040
5.'34F5252
783
SORRY:
DEFM
I
SORRY·'
20450D
784
DEFB
(;R
785
78b
;
TABLE
GIVING
JlIt1P
TO
ADDRESS
FOR
COttlANDS
2046
AE25
787
TOKJT:
DEFW
LIST
2048
6F25
7SS
DEFW
CLRSCR
204A
8A25
789
DEFW
RUN
204C
8026
790
DEFW
NEXT
204E
EC22
791
DEFW
LINEDR
2050
1027
792
DEFW
IFF
2052
A325
793
DEFW
GOTO
20542726
794
DEFW
GOSlJB
2056
4726
795
DEFW
RETURN
20583A22
796
DEFW
BOXDRW
205A
5026
797
DEFWFOR
205C
3627
798
DEFW
INPUT
20SE
E625
799
DEFW
PRINT
800
INTERRUPT
VECTORS:
2060
F620
801
.JTAB:
DEFW
SIDINT
j
ff
TAPE
INTERRUPT
VECTOR
If
2062
B020
802
!TAB:
DEFW
TBIINT
jff
MUSIC
INTERRUPT
VECTOR
II
803
;
TABLE
GIVING
ASCI
I
(;HAAS
FOR
TOKENS
2064
804
TOKTXT:
2064
4C4953
805
DEFK
'LIS'
2067
D4
806
DEFB
'T'
+80H
2068
434(4541
807
DEFM
'CLEA'
20be
D2
80S
DEFB
'R/+80H
2060
5255
809
DEFM
'RU'
206F
CE
810
DEFB
'N'+SOH
2070
4E455S
811
DEFM
'NEX'
2073
04
812
DEFB
'T I
+SOH
*I'IODCOt1P
Z-OO
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEt1
PAGE
4
ADDR
OBJECT
sm
LABEL
OPCD
OPERAND
COt1t1ENT
2074
4C494E
813
DEFM'LIW
2077
C5
814
DEFB
'E"+OOH
2078
49
815
DEFB
'1-'
2079
Cb
81b
DEFB
T'+80H
207A
474F54
817
DEFM
'GOT'
2070
CF
818
DEFB
"O"+OOH
207E
474F535S
819
DEFI1
'GOSU'
2082
C2
820
DEFB
-'B'+OOH
2083
52455455
821
DEFM
'RETUR;
2088
CE
822
DEFB
"W+OOH
2089
424F
823
DEFM
'BO'
208B
OS
824
DEFB
-'
X '
+8OH
208C
464F
825
DEFM
'FO'
20SE
D2
826
DEFB
"R'+8OH
20SF
494£5055
827
DEFM
'INPU'
2093
D4
828
DEFB
T'+OOH
2094
5052494E
829
DEFM
'PRIW
2098
D4
830
DEFB
'T'+OOH
2099
535445
831
DEFM
-'STE'
209C
DO
832
DEFB
'P'
+8OH
209D
524E
833
DEFM
'-RW
209F
C4
834
DEFB
'D'+OOH
20AO
54
835
DEFB
'T'
20Al
CF
836
DEFB
'0'
+8OH
8.37
838
i
DEVICE
VARIABLE
TABLE
839
;
THIS
TABLE
IS
IN
INVERSE
ORDER
OF
APPEARENCE
IN
MEI'IORY
}OOO7
840
PARNUM
EQlI
7 j 7
GUYS
20Al
841
DEVLST:
20A2
12
842
DEFB
'R'-'@'
2003
4D
843
DEFB
'M'
20M
18
844
DEFB
'X'-'@'
2005
59
845
DEFB
'Y'
20M
03
846
DEFB
'C
l
-'@'
20A7
59
847
DEFB
'Y'
20A8
03
848
DEFB
'C'-'@'-
2OA958
849
DEFB
"X"
20AA
OE
850
DEFB
'W-"@'
2MB
54
851
DEFB
'T'
20AC
06
852
DEFB
'F/-"@'
20AD
43
S53
DEFB
'Co'
20AE
02
854
DEFB
'B'-'@'
20AF
43
S55
DEFB
'C'
S56
j
TINY
BASIC
INTERRUPT
ROUTINE
20BO
F5
S57
TB
II
NT
:
PUSH
AF
j
SAVE
REGISTERS
20Bl
C5
858
PUSH
Be
20B2
D5
859
PUSH
DE
20B3
E5
SbO
PUSH
HL
861
i
DEAL
WITH
KEYBOARD
SCAN
TIMER
2084
215..."l4E
862
LD
HL,KEYTMR
20B7
7E
863
LD
A,
(HL)
20BS
A7
864
AND
A
2089
2801
865
JR
Z,TBlOO-$
20BB
3"5
866
DEC
(HL)
20Be
23
867
TBlOO:
INC
HL
86S
i
HAS
MUSIC
TIMER
COUNTED
DOWN?
20BD
7E
869
LD
A,(HU
fMODCOI1P
Z-80
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
5
ADDR
OBJECT
SOO
LABEl
OPCD
OPERAND
COMMENT
20BE
A7
870
AND
A
20BF
2808
871
JR
Z,
TBIN1-$
j
YEP
-
PLAY
NEXT
NOTE
20CI
35
872
DEC
(HU
j
ELSE
DECREMENT
IT
20C2
201F
873
JR
NZ,TBIN3-$
j
JUMP
IF
NOT
NOW
ZERO
2OC4
AF
874
XOR
A
2OC.s
0311
875
OUT
<TQNEA),
A j
ELSE
SILENCE
2OC7
1818
876
JR
TBIN2-$
8n
i
I'IUSIC
TIMER
IS
AT
ZERO
-
ARE
NEW
PARAMETERS
READY?
2OC923
878
TBIN1:
INC
HL
j
STEP
TO
NEW
TIMER
VALUE
20CA
B6
879
OR
(HLI
j
IS
IT
NON
ZERO?
20CB
2816
8SO
JR
Z,TBIN3-$
j
J.
IF
NOT
20CD
2B
881
DEC
HL
j
ELSE
SET
OFFICIAL
TIMER
20CE
n
SS2
LD
(HL),A
20CF
23
S83
INC
HL
2000
3600
8S4
LD
(HL},O
j
ZERO
NEW
TIMER
VALUE
AS
FLAG
20D2
23
885
INC
HL
20D3
7E
886
LD
A,
(HL)
;
GET
NEW
11.
O.
2004
0310
887
OUT
<TONI'IO>
A
20D6
3647
ass
LD
(HL).OA2
j
RESET
DEFAULT
MASTER
OSC
20DS
23
889
INC
HL
20D9
7E
890
LD
A.
(HL)
;
AND
NEW
TONE
20DA
1).311
891
OUT
<TONEAl,A
20De
A7
892
AND
A i
REST
WANTED?
lODD
2804
893
.JR
Z,TBIN3-$
j
YES.;.
JUMP
AROUND
VOLUME
UPDATE
20DF
3EOF
894
LD
A,lS
20E1
0316
895
TBIN2:
OUT
(VOLABl,A
896
j
SET
COLOR
REGISTERS
TO
VALUES
IN
PARAMETER
VARS
XO
AND
Xl
20E33AA24E
897
TBIN3:
LD
A,
(DEVCLO)
20E6
0304
898
OUT
(COLOU,A
20E80305
899
OUT
(COLIU,A
20EA
3AA44E
900
LD
A'(DEVCLll
20ED
0306
901
OUT
{C0L2U,
A
20EF
0307
902
OUT
(COL3U,A
903
;
DONE
-
RESTORE
REGISTERS
AND
GO
BAC~
2OF1
El
904
INTOON:
POP
HL
2OF2
01
91-"'15
POP
DE
20F3
Cl
906
POP
Be
2OF4
1833
907
JR
ZRONK-$
908
i
SERIAL
INPUT
DRIVER
INTERRUPT
ROUTINE
909
i
THIS
ROUTINE
SAMPLES
THE
SERIAL
INPUT
BIT
910
j
AND
FORMS
CHARACTERS
WHICH
ARE
PLACED
IN
THE
911
j
CIRCULAR
INPUT
BUFFER
FOR
CONSUMPTION
BY
BACKGROUND
LEVEL
912
913
;
THIS
ROUTINE
USES
THE
ALTERNATE
REGISTER
SET
914
i
WHERE
B=STATE
VARIABLE,
C=CHARACTER
ACClIttllATOR
915
;
IF
STATE
VAR
( 0 =)
WE
ARE
AWAITING
-N
STOP
BITS
BEFORE
916
WE
BELIEVE
ANYTHING
917
i
IF
STATE
VAR
= 0
=)
WE
ARE
L~:ING
FOR
A
START
BIT
918
i
IF
STATE
VAR
) 0
=}
WE
ARE
GETTING
DATA
BITS
20F6
F5
919
SIDINT:
PUSH
AF
20F7
D9
920
EXX
921
j
SAMPLE
THE
INPUT
BIT
20FS
DB12
922
GETBIT:
IN
A,
(TAPEIO)
20FA
iF
923
RRA
j
DATA
TO
CV
20FB
79
924
LD
A,C
j
SHIFT
INTO
ACCUMULATOR
20FC
17
925
RLA
20FD
4F
926
LD
C.A
tI'IODCOI'IP
Z-SO
CROSS
ASSEI1BI..ERf
HOt1E
VIDEO
GAI'IE
SYSTEM
PAGE
6
ADDR
OBJECT
sm
LABEL
OPCD
OPERAND
COMt1ENT
20FE
78
927
LD
A,B
;
WHAT
STATE
ARE
~
IN?
20FF
A7
928
AND
A
2100
FA0D21
929
JP
I1,SIDlNO
; 1
COUNTING
STATE?
2103
2011
930
JR
NZ.
SIDINl-$
i
JlJMP
IF
IN
MIDDLE
OF
CHAR
931
;
WE
ARE
WAITING
FOR
A
START
BIT
2105
CB41
932
BIT
o,e
;
DID
WE
GET
ONE?
2107
201F
933
JR
NZ,
SIDIN3-$
; JlW
IF
RIGHT
2109
0608
934
LD
B,8
;
SET
WAITING
FOR
8
BITS
210B
181B
93S
JR
SIDIN3-$
i
AND
GO
GONZO
93b
;
TAPE
INPUT
WAS
RECENTlY
TURNED
ON.
AND
WE
ARE
WAITING
FOR
937
;
SEVERAl
SEARCH
WINDOWS
IN
A
ROW
TO
EACH
SHOW
A 1
BIT
93S
i
II1PlYING
THAT
THIS
BEASTIE
IS
REAllY
WORKING
2100
04
939
SIDINO:
INC
B ;
ASSUt1E
WE
GOT
IT
210E
CB41
940
BIT
o.e
2110 2016
941
JR
NZ,
SIDIN3-$
;
JUI'f
IF
GOOD
ASSUMPTION
942
;
NO
-
RESET
COUNTER
AND
WAIT
SOI1E
t10RE
21120bFC
943
LD
B,STPBCT
2114
1812
944
JR
SIDIN3-$
945
;
IN
THE
MIDDlE
OF
A
CHARACTER.
..
946
;
WAS
THIS
THE
lAST
BIT?
2116
1010
947
SIDINl:
DJNZ
SIDIN3-$
;
JUI1P
IF
NOT
948
;
WELCOME
TO
lAST
BITSVILLE
21182A204E
949
LD
HL,
(CONPRO)
;
GET
POINTERS
211B
7D
950
LD
A,L
211C
CD2C21
951
CAlL
BUI1PTR
;
A=P+l
211F
Be
952
CP
H ;
IS
C =
P+l?
2120
2806
95.3
JR
Z,SIDIN3-$
;
YEP
-
FUlL
-
IGNORE
2122
32204E
954
LD
(PROPTR),
A j
STUFF
PH
2125
264E
955
LD
H,
TAPBUF.
SHR.
S ;
POINT
INTO
BUFFER
2127
71
956
LD
(HU,C
2128
D9
957
SIDIN3:
EXX
2129
Fl
95S
ZRONK:
POP
AF
2I2A
FB
959
EI
2128
C9
960
RET
961
;
SUBROUTINE
TO
INCREI'IENT
1
BYTE
POINTER
TO
CIRCULAR
BUFFER
212C
3C
962
BlJlPTR:
INC
A ;
BIJIP
IT
2120
FE52
963
CP
TBFEND.
AND.
OFFH
212F
CO
964
RET
HZ
;
QUIT
IF
NOT
AT
END
2130
3E22
965
LD
A,
TAPBUF.
AND.
OFFH
i
ELSE
WRAP
AROUND
2132
C9
966
RET
967
j
ROUTINE
TO
ESTABLISH
TAPE
UNIT
AS
INPUT
DEVICE
2133
F3
968
TINPES:
0.1
2134
212222
969
LD
Hl,.
RES.
«
<TAPBUF.
AND.
OFFH).
SI-L
8)+(TAPBlf.
AND.
OFFH»
2137
22204E
970
LD
(CONPRO)
,
Hl
213A
D9
971
EXX
2138
AF
972
XOR
A
213C
32A64E
973
LD
(DEVIDI),
A
213F
3C
974
INC
A
2140
32C24E
975
LD
(TAPEST)
, A
2143
ObFC
976
LD
B,STPBCT
2145
D9
977
EXX
2146
3E18
978
LD
A.laH
2148
D30E
979
OUT
HNMODl.A
214A
FB
980
EI
981
j
IF
A
NAtE
TO
MATCH
WAS
SPECIFIED
9S2
;
IGNORE
INPUT
DATA
UNTIL
THAT
NAME
COI'IES
TIftJ
9S3
;
THIS
ROUTINE
PERFORMS
AN
ANCHORED
I1ATCH
*MODCM
Z-BO
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
AODR
O~JECT
STMT
LABEL
OPCD
OPERAND
COMMENT
PAGE
7
214B
E1
214C
C07B21
214F
CB
2150
1).'5
2151
OS
2152
CD9A2D
2155
D1
2156
4F
2157
CDCC2F
21SA
B9
2158
2014
215D
13
21SE
CDCC2F
2161
CD1B21
2164
20EB
2166
F1
2167
OS
2168
CD9A2D
216B
01
216C
FEOD
21bE
2OF7
2170
C9
2171
01
2172
CDCC2F
2175
89
2176
200S
211B
05
2179
1BE2
217B
FE3B
217D
CB
217E
FEOD
21BO
C9
2181
m
..
m1
2184
F7
2185
CD3321
2188
CD9A2D
2188
DF
218C
lSFA
21SE
3E02
2190
32C24E
2193
F7
2194
CD3321
2197
210040
219A
E5
219B
E5
219C
CD9A2Q
219F
E1
984
985
986
987
9S8
989
990
991
992
993
994
995
99t.
997
m
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
101B
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
RST
RSTIGN
CALL
ATNL
RET
Z
MATINO:
PUSH
DE
MATIN1:
PUSH
DE
CALL
CHKIO
POP
DE
LD
C,A
CALL
LDE
CP
C
JR
NZ,MATIN3-$
;
CHAR
MATCH
-
BUMP
PTRS
I'1ATIN2:
INC
DE
;
IGNORE
ANY
UGlY
BLANKS
;
ARE
WE
AT
NEW
LINE?
;
YEP
-
DECLARE
A
MATCH
;
SAVE
STRING
POINTER
;
SAVE
IT
;
LOAD
STRING
TO
MATCH
;
DOES
THIS
CHAR
MATCH?
;
.JUMP
IF
NEGATIVE
CALL
LDE
;
GET
NEXT
CHAR
CALL
ATNL
;
ARE
WE
DONE
JR
NZ,
MATIN1-$
;
NILCHO
-
KEEP
TRYING
IGNORE
UNTIL
NEW
LINE
CHAR
READ
FROM
TAPE
POP
AF
j
THROW
OUT
OLO
DE
MATIN9:
PUSH
DE
;
GET
AN0THER
CHAR
CALL
CHKIO
POP
DE
CP
CR
i
IS
THIS
THE
ONE?
JR
NZ,
MATlN9-$
;
NO
-
KEEP
IGNORING
RET
;
YEP
-
GO
BACK
;
MISMATCH
-
RESET
SCAN
POINTER
AND
TRY
AGAIN
MATIN3:
POP
DE
CALL
LDE
CP
C
JR
NZ,MATINO-$
PUSH
DE
JR
MATIN1-$
i
MATCH
WITH
LAST
CHAR
READ?
;
NILCHO
-
GO
BACK
TO
GO
;
YES
-
TAKE
IT
FROM
THERE
;
SUBROUTINE
TO
RETURN
ZERO
STATUS
IF
CHARACTER
IN
A
IS
NL
OR
ATNL:
CP
.';
I ;
CHECK
FOR
CONTINUATION
RET
Z
CP
CR
;
AND
FOR
CR
RET
;
COMMAND
TO
ESTABLISH
TAPE
UNIT
AS
INPUT
DEVICE
TnpUT:
CALL
TINPES
RST
RSTFIN
;
GO
HOME
;
COMMAND
TO
LIST
51UFF
ON
CRT
TlIST:
CALL
TINPES
TLIST1:
CALL
CHKIO
;
GET
CHARACTER
RST
RSTOCH
i
PRINT
IT
JR
TLISTl-$
i
DO
FOREVER
i
COMMAND
TO
ESTABLISH
OUTPUT
TO
TAPE
TOUTPIJ:
LD
A.
2 j
SET
OUTPUT
FLAG
LD
<TAPESTl.
A
RST
RSTFIN
;
COMMAND
TO
LOAD
128
BYTE
BOOTSTRAP
i
FROM
TAPE
TLOAD:
CALL
TINPES
i
FIRE
UP
REA[IlNG
LD
HL
rmMEM
PUSH
HL
TLOADl:
PUSH
HL
CALL
CHKIO
POPHL
*MODCOMP
Z-SO
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEI'I
ADDR
OBJECT
SIMT
LABEL
OPCD
OPERAND
COMMENT
PAGE
8
21AO
77
1041
21Al
23
,
1042
21A2
CB7D
1043
21M
28F5
1044
21A6
C9
1045
1046
1047
1048
21A7
E7
1049
21AS
13
1050
21A9
F5
1051
21M
CDOE22
1052
21AD
D5
1053
21AE
11804E
1054
21Bl
CD2B22
1055
21B4
01
1056
2185
1057
21B8
CDOEl2
1058
21BB
Fl
1059
21BC
D5
1060
218D
llB94E
1061
21CO
F5
1062
21Cl
CD2B22
1063
21C4
11804E
10M
21C7
Fl
lo.~5
21C8
0609
1066
21CA
CDI522
1067
21(:D
D1
1068
21CE
1069
21Dl
CDOE22
1070
2104
D5
1071
2105
11B04E
1072
1073
2108
010012
1074
2100
EB
1075
2IDC
1076
21DE
C630
1077
21EO
EB
1078
21El
CDE42.f
1079
21E4
23
10SO
21E5
23
1081
21E6
OC
1082
21E?
lOF2
1083
21E9
D1
1084
21EA
F7
10es
1086
1087
21EB
1088
21EE
C.5
1089
21EF
D7
1090
21FO
E5
1091
21Ft
1092
21F4
07
100/3
21F5
1094
21FS
C1
1095
21F9
OS
10%
21FA
55
1097
LD
(HL),A
INC
HL
~tlJ
1\
L-
BIT
7,L
JR
I,
TLOADl-$
RET
i
ENTER
BOOTSTRAP
BY
RETURNING
TO
IT
i
BCD
MATH
ROUTINE
INTERFACE
;
IMPLEMENTS
$+,
$-,
$i,
*1
SCOMAT:
RST
RSTIGN
INC
DE
PUSH
AF
i
SAVE
CODE
SCANNED
CALL
TSTVFF
i
GET
FIRST
VAR
PUSH
DE
LD
DE,BCDAI
j
CONVERT
TO
BCD
CALL
ASCBCD
POP
DE
TSTC
?,
,.
I
PIXDUD
j
INSIST
ON
COMt1AS
CALL
TSTVFF
j
GET
2ND
VAR
POP
AF
PUSH
DE
LD
DE,
BCDA2
j
SAME
STORY
PUSH
AF
CALL
ASCBCD
LD
DE,BCDA1
POPAF
Lrt
B.9
CALL
DOBCDO
POP
DE
i
SCAN
FOR
PLACE
TO
STORE
TSTC
/,.',
PIXDlJD
CALL
TSTVFF
PUSH
DE
LD
DE,BCDA1
;
ARGl
CONTAINS
THE
RESULT
-
STICK
IT
LAST
VAR
LD
BC,1200H
BCDASC:
EX
DE,HL
SYSTEM
lWOEXN
ADD
A,
'·0'
EX
DE,Hl
CALL
STHL
INC
Hl
INC
HL
INC
C
DJNI
BCDASC-$
POP
DE
RBT
RSTFIN
i
FUNCTION
TO
RETUI\'N
STATE
OF
ADDRESSED
pua
i
IE
...
PIX(X,Y)=
1
IF
PIXEL
IS
1.
0
IF
(I
PIXFUN:
TSTC
'(',PIXDUD
PUSH
BC
RBT
RSTEXP
PUSH
HL
ISTe
'·,",PIXDUD
RST
RSTEXP
TSlC
I)
I,
PIXDUD
POP
Be
PUSH
DE
;
SAVE
PTR
LD
D,L
*MODCOMP
Z-80
CROSS
ASSEMBlER*
HOME
VIDEO
GAME
SYSTEM
PAGE
9
ADDR
OBJECT
STMT
LABEL
OPCD
OPERAND
COt1t1ENT
21FB
59
1098
LD
E,C
21FC
CDF223
1099
CALL
R2A
21FF
EB
1100
EX
DE,Hl
2200
1101
SYSSUK
INDEXB
2202
0320
1102
DEFW
PIXTBl
2204
1A
1103
LD
A,
iDE)
,
GET
BYTE
FROM
SCREEN
2205
A6
1104
AND
(Hl) ,
MASK
OFF
NONSENSE
2206 2600
1105
LD
H,O
2200
be
1106
LD
L,H
2209
D1
1107
POP
DE
220A
Cl
1108
POP
BC
220B
CS
1109
RET
Z
220C
23
1110
INC
Hl
220D
C9
1111
RET
1112
,
SUBROUTINE
TO
GET
VARIABLE
MAKING
SURE
IT
IS
ONE
220E
CDEC29
1113
TSTVFF:
CALL
TSTV
2211
DO
1114
RET
NC
,
GO
BACK
IF
GOOD
1115
;
aSE
FALL
INTO
...
2212
C38629
1116
PIXOUD:
.JP
QWHAT
1117
;
SUBROUTINE
TO
DO
IT
2215
FE62
1118
DOBCDO:
CP
62H
, <
MUlT?
2217
300A
1119
JR
NC,BCD3-$
,NO
2219
FElD
1120
CP
,·'_1
j
YES
IS
IT
MINUS?
22113
2803
1121
JR
Z,BCD2-$
,
JUMP
IF
SO
2210
1122
SYSTEM
BCDAnD
i
NO
-
ITS
ADD
THEN
221F
C9
1123
RET
2220
1124
BCD2:
SYSTEM
BCD";)\JB
i
00
SUBTR
2222
C9
1125
RET
2223 2003
1126
BW3:
.JR
NZ,BCD4-$
;
JUMP
IF
NOT
=
TIMES
2225
1127
SYSTEM
BCDMUl
,
ELSE
MUlT
2227
C9
1128
RET
222B
1129
BCD4:
SYSTEM
BCDDIV
222A
C9
1130
RET
1131
;
SUBROUTINE
TO
CONVERT
ASCII
STRING
TO
BCD
1132
i
Hl
=
ASCII
IN,
DE=BCD
OUT
1133
;
OUT:
DE=ASCII
IN
BUMPED,
Hl=BCD
OUT
NOT
BUMPED
222B
EB
1134
ASCBCD:
EX
DE,Hl
222C
010012
1135
LD
13(,12000
222F
(DCC2F
1136
ASCEe1:
CALL
LDE
2232
1137
SYSTEM
STOREN
2234
or
1138
INC
C
2235
13
1139
INC
DE
2236
13
1140
INC
DE
2.."137
10Ft.
1141
D.JNZ
ASCBC1-$
2239
C9
1142
RET
1143
;
BOX
DRAW
ROUTINE
223A
D7
1144
OOXDRW:
RST
RSTEXP
;
GET
X
223B
E5
1145
PUSH
Hl
223C
1146
TSTC
",l,BOXDUD
;
FIND
COMMA
223F
07
1147
RST
RSTEXP
;
GET
Y
2240
E5
1148
PI.lc:H
Hl
2241
1149
TSTC
"
',BOXDUD
2244
CDE322
1150
CALL
EXPRCP
j
XS
2247
F5
1151
PUSH
AF
2248
1152
TSTC
',',BOXDUD
22413
CDE322
1153
CALL
EXPRCP
;
YS
224E
F5
1154
~.HAF
*MODCOI1P
1-80
CRO-SS
ASSE\'lBLER*
HOHE
VIDEO
GAi'IE
SYSTEI1
PAGE
10
ADDR
OBJECT
SniT
LABEL
opeD
OPERAND
COI1t1ENT
224F
1155
TSTC
l,',BOXDUD
2252
07
1156
RST
RSTEXP
2253
05
1157
PUSH
DE
2254
DDEl
1158
POP
IX
2...~
F1
1159
POP
AF
i
RESTORE
YS
2257
47
1160
LO
B,A
2258
Fl
1161
POP
AF
i
AND
XS
2259
4F
1162
LD
C,A
225A
7D
1163
LD
A,L
;
PRESERVE
FLAG
2258
E1
1164
POP
Hl
225C
55
1165
LD
O,L
2250
E1
1166
POP
Hl
225£
50
1167
LD
E,L
225F
6F
1168
LD
L.A
1169
i
NOW
WE
HAVE:
B=YS.
C=XS,
D=Y,
E=X,
L=FLAG
1170
i
LIMIT
CHECK
Y
2260
bO
1171
LD
H,B
2261
25
1172
DEC
H
2262
CB3C
1173
SRL
H
2264
7A
1174
LD
A,D
226.5
C09722
1175
CALL
SABS
2268
84
1176
ADD
A,H
2269
FE2C
1177
CP
44
226B
3023
1178
.JR
NC,BOXNDR-$
2260
7A
1179
LD
A,O
226E
84
1180
ADD
A,H
226F
57
1181
LD
O,H
1182
i
AND
X
2270
61
116'3
LD
H,C
2271
CB3C
1184
SRL
H
2273
7B
1185
LO
A,E
2274
C09722
1186
CALL
SASS
2277
84
1187
ADD
A,H
2278
FE51
1188
CP
81
227A
3014
1189
.JR
NC,BOXNDR-$
227C
7B
1190
LD
A,E
2270
94
1191
SUS
H
227E
SF
1192
LD
E.A
1193
;
DIDDLE
WITH
FLAG
BYTE
227F
70
1194
LD
A,L
2280
E603
1195
AND
3 i
tIODULO
4
2282
2SOC
119b
.JR
Z,BOXNDR-$
;
SKIP
DRAW
IF
ZERO
2284
0602
1197
SUB
2 i
ELSE
SUBTRACT
2
FOR
MASK
22Sb
F5
1198
BOXDR1:
PUSH
AF
2287
CDF223
1199
CALL
R2A
1200
;
HL
=
ASS
ADDR,
A =
SA,
B=YS,
C=XS
22SAD.3OC
1201
OUT
iMAGIC),A
me
F1
1202
POP
AF
2280
CD9C22
1203
CALL
BOXPIJT
2290
DDE5
1204
BOXNDR:
PUSH
IX
2292
01
1205
P'iJP
DE
2293
F7
1206
RST
RSTFIN
2294
C38629
1207
BOXOOD:
JP
QWHAT
2297
A7
1203
SABS:
AND
A
2298
FO
.
1209
RET
P
2299
ED44
1210
NEG
229B
C9
1211
RET
f/'IOraMP
1-80
CROSS
ASSEMBlERf
HOME
VIDEO
GAt1E
SYSTEM
PAGE
11
ADDR
OB.JECT
STMT
LABEL
OPeD
OPERAND
COMtENT
1212
j
SUBROUTINE
TO
DRAW
A
BOX
liN
SCftEEN
2.:."'91:
SF
1213
BOXPUT:
LD
E,A
mD
79
1214
LD
A,e
i 0 = X I 4
229E
OF
1215
RRCA
229F
OF
1216
RRCA
22AO
E6.3F
1217
AND
3FH
22A2
3C
1218
INC
A
22A3
57
1219
LD
D,A
1220
j
PAINT
FULL
BYTE
STRIPES
22M
15
1221
MPH:
DEC
D
22A5
2807
1222
JR
Z,MPT2-$
22A73EAA
1223
LD
A,10101010B
22A9
CDCl22
1224
CALL
STRIPE
22AG
18F6
1225
JR
MPTl-$
22AE
79
1226
MPT2:
LD
A,C
22AF
E603
1227
AND
3
22Bl
3C
1228
INC
A
22B24F
12i."9
LD
C,A
2283
AF
1230
XOR
A
22B4
00
1231
MPT3:
DEC
C
22B5
2806
1:;:"32
JR
Z,MPT4-$
22B7
OF
1233
RRCA
2288
OF
1234
RRCA
2289
F680
12:35
OR
10000000B
22BB
18F7
1236
JR
MPT3-$
22BD
CDC122
1237
MPT4:
CALL
STRIPE
22CO
AF
12~'8
XOR
A
1239
i
FALL
INTO
...
1240
j
SUBROUTINE
TO
PAINT
A
STRIPE
22Cl
E5
1241
STRIPE:
PUSH
HL
22C2
c.'5
1242
PUSH
Be
22C3
32FFOF
1243
LO
WRlNAU,A
22C6
3AFF4F
1244
LD
A,
WRINAL+40ooH}
22C9
4F
1245
LD
C,A
22CA
1B
1246
SIRP1:
LD
A,E
22CB
FEOI
1247
CP
1
22C02002
1248
JR
Nl.STRP2-$
22CF
7E
1249
LO
A.
(HL)
2200
A9
1250
XOR
e
2201
AE
1251
STRP2:
XOR
(HL)
2202
Al
1252
AND
C
2203
AE
1253
XOR
Oil)
2204
77
1254
LD
(HU,A
2205
7D
1255
LD
A.L
2206
C628
1256
ADD
A,BYTEPL
2200
6F
1257
LO
L.A
rLD97e
1258
LD
A.H
22DA
CEOO
1259
ADC
A.O
22DC
67
1260
LD
Hd\
22DD
lOEB
lUI
DJNZ
STRPl-$
22DF
C1
1262
POP
Be
22E0
El
1263
POP
HL
22El
23
1264
INC
HL
22E2
C9
1265
RET
1266
j
ROUTINE
TO
GET
EXPRESSION,
MAKING
SURE
IT
IS
POSITIVE
1267
i
AND
NONZERO
22E3
D7
1268
EXPRCP:
RST
RSTEXP
*MOOCOMP
I-SO
CROSS
A88EMBLER*
HOME
VIDEO
13A/'tE
SYSTEM
PAGE
12
ADDR
OBJECT
sniT
LABEL
OPCD
OPERAND
COt1HENT
22E4
7C
1269
LD
A,H
22E5
B7
1270
OR
A
22E6
203D
1271
JR
NZ,LINED4-$
22E8
B5
1272
OR
L
22E9
2S3A
1273
JR
Z,LINED4-$
22EB
C9
1274
RET
1275
j
LINE
DRAWER
22EC
D7
1276
LINEDR:
RST
RSTEXP
22m
7D
1277
LD
A,
L
nEE
F5
1278
PUSH
AF
22EF
1279
TSTC
',.',
LINED4
22F2
D7
1280
RST
RSTEXP
22F3
7D
1281
LD
A,L
22F4
F5
1282
PU.SH
AF
22F5
1283
LINED1:
TSTe'I',LINED4
22F8
D7
1284
RST
RSTEXP
22F9
44
1285
LD
B,H
22FA
4D
1286
LD
C,L
22FB
D5
1287
PUSH
DE
22FC
DDE1
1288
pop
IX
22FE
EOSBAC4E
1289
LO
DE,
WLOXY)
2302
Fl
1290
POP
AF
2303
67
1291
LD
H,
A
2304
Fl
1292
POP
AF
23056F
1293
LO
L,A
2306
C09023
1294
CALL
C"HKX
2309
3016
1295
.JR
N(,LINED3-$
VI
230B·7C
1296
LD
A,H
I'
230C
C09723
1297
CALL
CHKY
230F
3010
1298
JR
N(,LINED3-$
2311
22AC4E
1299
LD
(OLDXY),HL
. ;
SET
NEW
LAST
PLACE
1300
;
OIDDLE
WITH
FLAG
BYTE
2314
79
1301
LD
A,C
2315
Eb03
1302
AND
3
2317
2808
1303
.JR
Z,LINED3-$
2319
0602
1304
S'UB
2
231B325B4E
1305
LH4E02:
LD
{PIXVALl,A
;
SET
PIXVAL
231E
C02823
1306
.CALL
OVECT
2321
DDE5
1307
LINED3:
PUSH
IX
2323
01
1308
POP
DE
2324
F7
1309
RST
RSTFIN
2325
C3.sD2A
1310
LINED4:
JP
QHOW
1311
;
LARRY
LIVERMORE"S
VECTOR
DRAWING
ALGORITHM
1312
;
H=Yl,
L=Xl,
D=Y2,
E=X2
2328
os
1313
DVECT:
PUSH
DE
2329
45
1314
LD
B,L
232A
4B
1315
LD
C,E
232B
COD023
1316
CALL
CDELTA
232E
58
1317
LD
E,B
232F
69
1318
LD
L,C
23.'30
44
1319
LO
B,H
2331
4A
1320
LD
(iO
2332
COD023
1321
CALLCDELTA
2335
61
1322
LD
JtC
2336
50
132:3
LD
D,B
1324
i
WE
NOW
HAVE:
H=SGNWYJ.
L=SGNWX>
1325
i
D=ABS{DY)
,
E=ANS<DXl
tMODCOI1P
Z-SO
CROSS
ASSEI1BI..ERf
HOi'E
VIDEO
GAf1E
SYSTEtI
PAGE
13
ADDR
OBJECT
STm
LABEL
OPeD
OPERAND
COtt1ENT
233722SE4E
1326
LD
{INCRo),1-L
1327
i
DECIDE
WHICH
DELTA
IS
LARGER
1328
i
CALL
BIGGER
"X,
st1ALLER
f1N
233A
OEOO
1329
LD
C.O
233C
7A
1330
LD
A,D
233D
SB
1331
CP
E
233E
3803
1332
JR
C.VECTl-$
2340
53
1333
LD
O.E
2341
5F
1334
LO
E,A
2342
OC
lr~
INC
C
23437A
1336
VECT1:
LD
A,D
il1XTOA
2344
CB3F
1337
SRI.
A
2346
47
1338
LO
B.A
2347
EB
1339
EX
DE.IL
2348
225C4E
1340
LD
(f1Nt1X
)
I-L
2348
01
1341
POP
DE
234C
7D
1342
LD
A.L
234D
3C
1343
INCA
i
HAKE
SURE
LAST
PIXa
WRITTEN
1344
i
THE
INFAMOUS
PIXEL
PAINTING
LOOP
234E
F5
1345
VECT2:
PUSH
AF
234F
CDF223
1346
CALL
R2A
2352
C5
1347
PUSH
Be
2353
E5
1348
PUSH
HL
2354
4F
1349
LD
C,A
2355
0600
1350
LD
B.O
2357
210320
1351
LD
HL.PIXTBL
235A
09
1352
ADD
HL,BC
235B
46
1353
LD
B.Ot.)
235C
El
1354
POP
IL
235D
3A5B4E
1355
LO
A,
(PIXVAU
2360
FE01
1356
CP
1
23622002
1357
JR
NZ,VECT9-$
2364
7E
1358
LD
A,
(HL)
2365
AS
1359
XOR
B
2366
AE
1360
VECT9:
XOR
(Ii,)
2367
AO
1361
AND
B
2368
AE
1362
XOR
(Hll
236977
1363
LD
(HL),A
236A
Cl
1364
POP
Be
1365
j
INCREMENT
COORDINATES
236B
2A5C4E
1366
VECT2A:
LD
11.,
(I'1NMX)
mE
78
1367
LD
A,B
236F
84
1368
ADD
A,H
2370
SO
1369
CP
L
2371
3800
1370
JR
C,VECT4-$
237395
1371
SUB
L
2374
47
1372
LO
B,A
2375
2A5E4E
1373
LD
HL.
(INCRO)
2378
7A
1374
LD
A,D
2379
84
1375
ADD
A,H
237A
57
1376
LD
D.A
2378
78
1377
VEeT3:
LD
A.E
237(;
85
1378
ADD
A,L
237D
5F
1379
LD
E,A
237E
1808
1380
JR
VECTS-$
2380
47
1381
VECT4:
LD
B.A
2381
2A5E4E
1382
LD
tL,
UNCRO)
*MOOCOMP
Z
-80
CRQ.."S
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
14
ADDR
OBJECT
STI1T
LABEL
OPeD
OPERAND
COMMENT
2384
79
1383
LD
A.C
2385
OF
1384
RRC.A
23863OF3
1385
JR
NC,VECT3-$
23BS
7A
1386
LD
A,D
23B9
B4
1387
ADD
A,H
238A
57
1388
LD
D.A
1389
i
END
OF
LOOP
238B
F1
1390
VECTS:
POP
AF
23BC
3D
1391
DEC
A
238D
20BF
1392
.JR
NZ.VECT2-$
23BF
C9
1393
RET
13'~4
i X
CHECK
ROUTINE
2390
FESO
1395
CHKX:
CP
80
2392
DB
1396
RET
C
2393
FEBO
1397
CP
OBOH
i
**
-SO
**
23953F
1398
CCF
2396
C9
1399
RET
1400
; Y
CHECK
ROUTINE
2397FE2C
1401
CHKY:
CP
44
2399
DB
1402
RET
C
239A
FED4
1403
CP
OD4H
239C
3F
1404
CCF
239D
C9
1405
RET
1406
j
SUBROUTINE
TO
LOAD
HL
WITH
VOM
COORDINATES
1407
;
FROM
DEVICE
VARIABLES
mE
F5
1408
LDVDt1C:
PUSH
AF
239F
3AAA4E
1409
LD
A,
(VOMY)
23A22F
1410
CPL
23A3
C629
1411
ADD
A,41
23A5
FES1
1412
CP
81
i
OUT
OF
RANGE?
23A73801
1413
.JR
C,LDVDM1-$
iNC
23A9
AF
1414
XOR
A
23M
67
1415
LDVDt11:
LD
H,A
23AB
3AAB4E
1416
LD
A,
<VOMXi
;
DIDDLE
WITH
X
23AE
CMD
1417
ADD
A,
77
2300
FE9D
1418
CP
157
2381
3801
1419
jR
C,LDVDt12-$
23B4
AF
1420
XOR
A
23B56F
1421
LDVDt12:
LD
L,A
2386
F1
1422
POP
AF
23B7
C9
1423
RET
1424
;
SUBROUTINE
TO
STORE
HL
INTO
VOM
COORDINATE
DEVICE
VARIABlES
23BS
E5
1425
STVDMC:
PUSH
HL
2389
7C
1426
LD
A,H
23M
0629
1427
SUB
41
23BC
2F
1428
CPL
23BD
6F
1429
LD
L,A
23BE
CDE02S
1430
CALL
SGNEXT
23Cl
22AA4E
1431
LD
(VDMY),HL
23C4
E1
1432
POP
HL
23C57D
1433
LD
A,L
23C6DMD
1434
S'UB
77
23CS
bF
1435
LD
L.A
23C9
CDE02S
1436
CAlL
SGNEXT
23ee
22AB4E
1437
LD
tvDr'lX},HL
23CF
C9
1438
RET
1439
;
SUBROUTINE
TO
COMPUTE
DELTA
AND
INCREt1ENT
FOR
TWO
COORDINATES
*MODeOl'1P
1-80
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEtt
PAGE
15
ADDR
OBJECT
STttT
LABEL
OPCD
OPERAND
COMMENT
23DO
E5
1440
CDELTA:
PUSH
HL
23D1
OS
1441
PUSH
DE
23D2
69
1442
LD
L,e
2303
CDE028
1443
CAlL
SGNEXT
23D6
EB
1444
EX
DE.HL
23D7
68
1445
LD
L.B
2308
CDE028
1446
CALL
SGNEXT
23DB
AF
1447
XOR
A
23De
ED52
1448
SBC
HL,DE
1449
;
COMPUTE
SGN(DELTA)
AND
ABS(DELTA}
23DE
B4
1450
OR
H
23DF
2807
1451
JR
Z,CDELTl-$
23E1
4F
1452
LD
C,A
23E2
7D
1453
LD
A,L
23E3
ED44
1454
NEG
23E5
47
1455
LD
B,A
23E6
1807
1456
JR
CDELT3-$
23E8
B.S
1457
CDELT1:
OR
L ;
POS
CASE
O?
23E92802
1458
JR
Z.CDELT2-$
23EB
3EOl
1459
LD
A.l
23m
45
1460
CDELT2:
LD
B,L
P...EE
4F
1461
LD
C,A
23EF
Dl
1462
CDELT3:
POP
DE
23F0
E1
14l00J
POP
HL
23F1
C9
1464
RET
1465
;
RELATIVE
TO
ABSOLUTE
CONVERSION
23F2
D5
1466
R2A:
PUSH
DE
23F37A
1467
LD
A,D
23F42F
1468
CPL
23F5
C62C
1469
ADD
A,44
23F7
'57
1470
LD
D,A
23F87B
1471
LD
A,E
23F9
C650
1472
ADD
A.80
23m
SF
1473
LD
E.A
23FC
AF
1474
XOR
A
23m
1475
SYSTEtt
RELAB1
23FF
EB
1476
EX
DE.HL
2400
D1
1477
POP
DE
2401
("9
147S
RET
1479
i
k13
-
FUNCTION
TO
RETURN
NEXT
CHARACTER
FROtt
KEYBOARD
2402
C'5
1480
GEW]:
PIJSH
Be
2403
OS
1481
PUSH
DE
2404
CD9A2D
1482
CAlL
CHKIO
2407
D1
1483
POP
DE
2408
C1
1484
POP
Be
2409
bF
148'5
LD
L,A
240A
2600
1486
LD
H,O
240C
C9
1487
RET
1488
;
DEVICE
VARIABLE
TO
OUTPUT
TO
REFERENCED
10
PORT
240D
EF
1489
PUTIG:
RST
RSTPAR
j
GET
PORT
It
240E
1490
TSTC
'=',PUTCD2
;
GET
EQUALS
2411
E5
1491
PUSH
HL
i
SAVE
PORT
It
2412
07
1492
RST
RSTEXP
j
EVAlUATE
EXPRESSION
FOlLOWING
2413
7D
1493
LD
A,L
j
A=VAlllE
TO
OUTPUT
2414
El
1494
POP
HL
;
RESTORE
PORT
i
2415
C5
1495
PUSH
Be
2416
44
1496
LD
B.H
fMODDOMP
Z-80
~SS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
16
ADDR
OBJECT
STMT
LABEL
OPCD
OPERAND
COMMENT
2417
4D
1497
LD
e,l
2418
ED19
1498
OUT
{Cl,A
i
DO
IT
241A
Cl
1499
POP
Be
2418
F7
1500
RST
RSTFIN
i
GO
HOME
1501
i
FUNCTION
TO
RETURN
VALUE
OF
A
GIVEN
10
PORT
241C
EF
1502
IOfUN:
RST
RSTPAR
i
GET
PORT
NUMBA
241D
C5
1503
PUSH
Be
241E
44
1504
LD
B,H
241F
4D
1505
LD
C,l
2420
ED78
150b
IN
A,
(Cl
2422
bF
1507
LD
L.A
2423
2600
1508
LD
H,O
2425
Cl
1509
POP
Be
242b
C9
1510
RET
1511
;
DEVICE
VARIABLE
TO
PLAY
NOTE
WITHOUT
PRINTING
2427
1512
PLlTMLI:
TSTC
'=',PUTCD2
242A
D7
1513
RST
RSTEXP
24213
7D
1514
lD
A,L
242C
CDS22E
1515
CALL
POOTE
242F
F7
1516
RST
RSTFIN
1517
j
DEVICE
VARIABLE
TO
OUTPUT
CHARACTER
ON
VOM
2430
1518
PUTCD:
TSTC
!
=',
PUTCD2
2433
D7
1519
RBT
RSTEXP
2434
7D
1520
LD
A,L
2435
OF
1521
RST
RSTOCH
2436
F7
1522
RST
RSTFIN
2437
C38629
1523
PUTCD2:
JP
QWHAT
1524
;
ROUTINE
TO
TRANSFER
CONTROL
TO
ASSEMBLY
LANGUAGE
SUBROUTINE
243A
214324
1525
DOCALL:
LD
HL,BBRET
i
PUSH
RETURN
ADDR
ON
STACK
2430
E5
1526
PUSH
HL
243E
D7
1527
RST
RSTEXP
i
GET
ADORESS
243F
E9
1528
JP
(HU
;
AND
JUMP
TO
IT
1529
;
COMMAND
TO
RESTORE
TINY
BASIC
INTERRUPT
ROUTINE
2440
CD4424
15.30
TRETUR:
CALL
TBIEST
2443
F7
1531
BERET:
RST
RSTFIN
;
GO
HOME
2444
DB12
1532
TBIEST:
IN
A,
!TAPEIOl
j
INITIALIZE
TAPE
INTERFACE
2446
Eb02
1533
AND
2
2448
20FA
1534
JR
NZ,TBIEST-$
i
WAIT
FOR
THANG
TO
GO
TO
ZERO
244A
32C24E
1535
LD
!TAPESn.A
244D
3E03
1536
LD
A,3
244F
32Ab4E
1537
LD
<DEVTEMl,A
1538
i
ACTIVATE
TINY
BASIC
INTERRUPT
ROUTINE
2452
F3
1539
(II
2453
EDSE
1540
1M
2
2455
3E20
1541
LD
A,ITAB.SHR.B
24'S!
ED47
1542
LD
I,A
24593EOO
1543
LD
A,S
2458
D30E
1544
OUT
(INMOD),
A
245D
3EC8
1545
LD
A,200
245F
roOF
154b
OUT
HNLINl,A
2461
3Eb2
1547
LD
A,
!TAB.
AND.
OFFH
2463
D30D
1548
OUT
(INFBlO,A
2465
FE
1549
EI
2466
C9
1550
RET
1551
j
**
TINY
BASIC
EXECUTION
STARTS
HERE
ff
1552
;
CLEM
WHOlE
KIT
AND
YJ\BOODLE
2467
AF
1553
BEGIN:
lOR
Ii
*I1ODCOI'IP
1-80
CROSS
ASSEt1BLER*
HOI'IE
VIDEO
GAI'IE
SYSTEM
PAGE
17
ADDR
OBJECT
STI'IT
LABEl
OPCD
OPERAND
COMMENT
2468D30C
1554
OUT
H1AGIC).
A
24bA
67
1555
LD
H,A
246B
6F
1556
LD
LA
24bC
47
1557
LD
B,A
246D
70
1559
BEGIN1:
LD
(HU,B
246E
23
1559
INC
HL
246F
7C
1560
LD
A,H
2470
FESO
1561
CP
SOH
2472
2OF9
1562
JR
Nl.BEGIN1-$
2474
31CE4F
1563
LD
SP,SYSRAI'I
2477
1564
SYSTEM
INTPC
2479
1565
DO
SETOUT
247A
BO
1566
DEFB
176
2418
2C
1567
DEFB
44
247C
OS
1568
DEFB
8
247D
1569
DO
Et1USIC
i
SHUT
DOWN
MUSIC
247E
1570
DO
SErB
247F
47
1571
DEFB
CA2
i
SET
INITIAL
MASTER
OSCILATOR
2480584E
1572
DEFW
t1UII1O
1573
INITIALIZE
DEVICE
VARIABLES
2482
1574
DO
MOVE
2483
A24E
1575
DEFW
DEWAR
2485
OAOO
1576
DEFW
10
2487
1020
1577
DEFW
INIDEV
2489
1578
DO
MOVE
248A
6b4E
1579
DEFW
ALTFON
248(:
0700
1580
DEFW
7
248£
0602
1581
DEFW
FNTSYS
2490
1582
DO
SETW
2491
AOO6
1583
DEFW
bAOH
2493
664E
1584
DEFW
ALTFON
2495
1585
DO
SETW
2496
04AO
1586
DEFW
TEXT+4
2498
524E
1587
DEFW
rxTUNF
249A
1588
DO
XINTC'
249B
21.01AO
1589
LD
HL,TEXT+l
249E
3m
1590
LD
A.OFF~
-
2400
CDE42F
1591
CALL
STI:IL
24A3
C04424
1592
INITO:
CALL
TBIEST
24A6
CD8A2C
1593
INIT:
CALL
CRLF
1594
i
DIRECT
COtttAND
-
TEXT
COLLECTOR
24A9
1595
TELL:
24A9
112920
1596
LD
DE.MSG
24AC
CDFD2A
1597
CALL
PRTSTG
24AF
1598
STOP:
24AF
31EF4F
1599
RSTART:
LD
SP,STACK
24B2
21B924
1600
LD
HL.
?ST1+1
2485
22C34E
1601
LD
{CURRNT>
I
HL
2400
210000
1602
?ST1:
LD
HL,O
24BB
22C94E
160:3
LD
{LOPVAR
l.
HL
24BE
22C54E
1604
LD
(STKOOS),HL
24Cl
3E3E
1605
?ST2:
LD
A'v
, J
24(:3
CDF02B
1606
CALL
GETLN
24Gb
D5
1607
PUSH
DE
24C7
11D44E
1608
LD
DE,BUFFER
1609
IGNORE
ANY
LEADING
1)'
24CA
lA
1610
LD
Ii.
WEl
iHOOCOI'IP
2-80
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
18
ADDR
OB.JECT
STMT
LABEL
OPeD
OPERAND
COItIENT
24CB
FE3E
1611
CP
,
....
'
J
24CD
2001
1612
JR
NZ,?ST4-$
24CF
13
1613
INC
DE
24DO
CD622A
1614
?ST4:
CALL
TSTNUM
2403
E7
1615
RST
RSTIGN
2404
7C
1616
LD
A,H
24D5
B5
1617
OR
L
2406
C1
1618
POP
Be
24D7
284C
1619
JR
Z,EXECO-$
2409
22644E
1620
LD
<OLDLN),HL
240C
IB
1621
DEC
DE
2400
7C
1622
LD
A,H
24DE
12
1623
LD
<DE),
A
24DF
18
1624
DEC
DE
24EO
7D
1625
LD
A,L
24El
12
1626
LD
<DE),
A
24E2
C5
1627
PUSH
Be
24E3
D5
1628
PUSH
DE
24E479
1629
LD
A,C
24E593
1630
SUB
E
24E6
F5
1631
PUSH
AF
24E7
cocm
16..:.""'2
CALL
FNDLN
24EA
D5
1633
PUSH
DE
24EB
2010
1634
JR
NZ,?ST3-$
24ED
D5
1635
PUSH
DE
24EE
CDE029
1636
CALL
FNDNXT
24F1
Cl
1637
POP
Be
24F22A524E
1638
LD
HL.
<TXTUNF)
24F5
C0942A
1639
CALL
MVUP
24FS
bO
1640
LD
H,B
24F969
1641
LD
L,C
24FA
22524E
1642
LD
(TXTUNF),
HL
24FD
Cl
1643
?ST3:
POP
Be
24FE
2A524E
1644
LD
HL,
nXTUNFl
2501
Fl
1645
POPAF
2502
E5
1646
PUSH
HL
2503
FE03
1647
CP
3
2505
28Al3
1648
JR
Z,RSTART-$
2507
85
1649
ADD
A,L
2508
5F
1650
LD
E,A
2509
3EOO
1651
LD
A,O
25088C
1652
ADC
A,H
250C
57
1653
LD
D,A
250D
210CA7
1654
LD
HL,DFTLMT
2510
EB
1655
EX
DE,HL
2511
CD4D29
1656
CALL
COMP
2514
D28D29
1657
JP
NC,QSORRY
251722524E
1658
LD
nXTUNF),HL
251A
D1
1659
POP
DE
2518
CDA62A
1660
CALL
t1IJDOWN
251E
Dl
1661
POP
DE
251F
El
1662
POP
HL
2520
CD942A
1663
CALL
MVUP
2523
1S9C
1664-
,JR
?ST2-$
1665
l
DIRECT
AND
EXEC
2525
E7
1666
EXEC/):
RST
RSTIGN
;
GET
FIRST
NONBLANK
2526
OS
1667
PUSH
DE
~-,
-
-~
--------
*MODCOMP
1-80
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
19
ADDR
OB-JEcr
snIT
LABEL
OPeD
OPERAND
COItIENT
2527
FE68
1668
CP
6aH
;
IS
SHE
A
TOKEN?
2529
3813
1669
JR
C.EXECOA-$
;NO
252BFE75
1670
CP
7SH
252D
300F
1671
JR
NC.EXECOA-$
;
NO
1672
;
WE
FOUND
A
TOKEN
-
LOOKUP
IN
TABLE
AND
JUI'IP
TO
IT
252F
07
1673
RLCA
2530
SF
1674
LD
E.A
2531
1600
1675
LD
D,O
2533
217b1F
1676
LD
HL,TOKJT-20B
2536
19
1677
ADD
HL,DE
2537
5E
1678
LD
E,
(HL)
2538
23
1679
INC
HL
2539
56
1680
LD
D.
(HL)
253A
EB
1681
EX
DE.HL
253B
01
1682
POP
DE
253C
13
1683
INC
DE
2530
E9
1684
JP
(HL)
1685
;
NOT
A
TOKEN
- A
VARIABLE
PERHAPS?
253E
CDEC29
Ib8b
EXECOA:
CALL
TSTV
2541
3808
1687
JR
C,EXECOB-$
;
NO
-
DO
SEARCH
2543
16BB
TSTC
'=',EXECOB
;
MAYBE
2546
Cl
1689
POPBC
i
THROW
OUT
OLD
PTR
2547C05929
1690
CALL
S'ETV1
;
DO
ASSIGNt1ENT
254A
F7
1691
RST
RSTFIN
254B
Dl
1692
EXECOB:
POP
DE
254C
21702B
1693
LD
HL.
TAB2-1
254F
E7
1694
EXEC:
RST
RSTIGN
2550
05
1695
PUSH
DE
2551
CDCC2F
1696
EXl:
CALL
LDE
2554
13
1697
INC
DE
2555
23
1693
INC
HL
2556
BE
1699
CP
(HLl
2557
2SF8
1700
JR
I,EXl-$
25593E7F
1701
LD
A,07FH
255B
IB
1702
DEC
DE
255C
BE
1703
CP
(HLl
255D
3808
1704
JR
C,EX5-$
255F
23
1705
EX2:
INC
HL
2560
BE
1706
CP
(HLl
2561
30FC
1707
JR
NC,EX2-$
2563
23
1708
INC
HL
2564
D1
1709
POP
DE
25b5
leE8
1710
JR
EXEC-$
25677E
1711
EX5:
LD
A,(HL)
2568
23
1712
INC
HL
2569
bE
1713
LO
L,
(HL)
256A
E67F
1714
AND
07FH
256C
67
1715
LD
H.A
2560
Fl
1716
POP
AF
256E
E9
1717
JP
{HLl
1118
;
COtWtNO
TO
CLEAR
SCREEN
25bF
1719
CLRSCR:
25bF
210040
1720
LD
HL.
4000H
25i2
01100E
1721
LD
BC.90fBVTEPL
2575
1E
1722
CLRLP:
tD
A.
{HU
2576Eb55
1723
AND
01010101B
251817
1724
LD
(HU.A
- -
---
--~--~"--.-
fP'lOllCOtlP
I-SO
CROSS
ASSEt1BI..ERf
HOME
VIDEO
GAME
SVSTE"
PAGE
20
ADDR
OBJECT
SOO
LABEL
0Pe0
OPERAND
COMNT
2579
23
1725
INC
HL
257A
OB
1726
IEC
Be
2578
78
1727
LD
A,B
257C
Bl
1728
OR
C
2S7D
2OF6
1729
JR
NI,CLRLP-$
1730
i
RESET
VDtt
GOODIES
257F
OS
1731
PUSH
DE
2580
1732
SYSSUK
MOVE
2582
A84E
1733
DEFW
IJDtIX
2584
0600
1734
DEFW
6
2586 2320
1735
DEFW
INIDEV+6
2588
D1
1736
POP
IE
25S9
F7
1737
RST
RSTFIN
258A
1100A0
1738
RUN:
LD
DE,
TEXT
25S0
210000
1739
RUNNXL:
LD
Hl,O
2590
CDCB29
1740
CALL
FNDLP
2593
DAAF24
1741
..p
C,RSTART
2596
ED
1742
RUNTSL:
EX
DE,HL
259722C34E
1743
LD
(CURRNT)
,
HL
259A
EB
1744
EX
DE,HL
259B
13
1745
INC
DE
259C
13
1746
INC
IE
259D
CD3D2E
1747
RUNSI'IL.:
CALL
WHATSU
i
Cf£CK
FOR
INTERRlPT
KEY
25AO
C32525
1748
..p
EXECO
25A3
07
1749
ooTO:
RST
RSTEXP
25M
D5
1750
PUSH
DE
25A5
CDC329
1751
CALL
FNDLN
25A8
C28E2A
1752
.f'
NZ,AHOW
25AB
F1
1753
POPAF
25AC
18E8
1754
JR
RUNTSL-$
1755
i
LIST
AND
PRINT
1756
;
NEW
-
IMPROVED
LIST
COttIAND
1757
;
LETS
YOU
PUT
IT
IN
A
PROGRAI1
25AE
210000
1758
LIST:
LD
HL.O
;
ASSUI1E
AT
EOL
2581
E7
1759
RST
RSTIGN
;
IGNORE
25B2
CD7B21
1760
CALL
ATNL
25B5
2805
'1761
JR
I.
LS-'3-$
2587
FE2C
1762
CP
I I ;
LEADING
COt9IA?
,
2589
2801
1763
JR
I,LS3-$
;
VEP
-
SKIP
FIRST
EXPR
GET
1704
;
NOT
AT
END
-
GET
FIRST
EXPR
258B
07
1765
LS2:
RST
RSTEXP
25BC
E5
1766
LS3:
PUSH
HL
25BO
21FFFF
1767
LD
HL,OFFFFH
25CO
1768
TSTC
',',LS4
25C3
D7
1769
RST
RSTEXP
25C4
OS
InO
LS4:
PUSH
IE
25C5
FlE1
Inl
POP
IV
25C7
E3
In2
EX
(SP),HL
25CS
CDC329
1773
CALL
FNDLN
25CB
3815
In4
LS5:
JR
C,LSOOIT-$
25CD
E3
1775
EX
(SP),HL.
25CE
7C
In6
LD
AtH
25CF
B5
17n
OR
L
25DO
2810
1778
JR
I.LSQUIT-$
25D2
2B
In9
IEC
Hl
2503
E3
1780
EX
(SPl,'"
25D4
CD6B2B
1781
CALL
PRTLN
fMOOCOt1P
1-00
CROSS
AS.S81BLER*
HOt1E
VIDEO
GAt'(
SYSTEM
PAGE
21
ADDR
OBJECT
STMT
LABEL
OPCD
OPERAND
COMMENT
25D7
COFD2A
1782
CALL
PRTSTG
25DA
CD3D2E
1783
CALL
WHATSU
25DD
CDCB29
1784
CALL
FNDLP
25EO
lSE9
1785
JR
LS5-$
25E2
FDE5
1786
LSOOIT:
PUSH
IY
25E4
Dl
1787
POP
DE
25E5
F7
1788
RST
RSTFIN
25E60EOS
1789
PRINT:
LD
C,8
25ES
1790
TSTC
'j/,PR1
25EB
C08A2C
1791
CALL
CRLF
25EE
18AD
1792
JR
RlINSML-$
25FO
1793
PR1:
TSTCC
CR,PRb
25F3
C08A2C
1794
CALL
CRLF
25F6
1895
1795
JR
RlINNXL-$
2SF8
1796
PR2:
TSTC
'i',PR4
25FB
D7
1797
PR3:
RST
RSTEXP
25FC
3ECO
1798
LD
A,OCOH
25FE
A5
1799
AND
L
25FF
B4
1000
OR
H
2600
C28D2A
1001
JP
NZ,QHOW
26034D
1002
LD
C,L
2604
1805
1003
JR
PR5-$
2606
CDOBlB
1004
PR4:
CALL
QTSTG
2609
1814 1005
JR
PR9-$
260B
1806
PRS:
TSTC
',',PRS
2bOE
1007
PRo:
TSTC
',I,PR7
2611
3E20
1008
LD
A,
l I
2613
OF
1809
RST
RSTOCH
2614
lSF8
18tO
JR
PR6-$
2616
CD6F29
1811
PR7:
CALL
FIN
2619
18DD
1812
JR
PR2-$
2MB
C0BA2C
1813
PR8:
CALL
CRLF
2b1E
F7
1814
RST
RSTFIN
261F
D7
1815
PRS':
RST
RSTEXP
2620
CS
1816
PUSH
BC
2621
CD2E2B
1817
CALL
PRTNlJM
2624
Cl
1818
POPBC
2625
lSE4
1819
JR
PRS-$
1820
;
GOSUB
AND
RETURN
2627
CDD42A
1821
GOSllB:
CALL
PUSHA
262A
D7
1822
RST
RSTEXP
262B
DS
1823
PUSH
DE,
262C
CDC31$'
1824
CALL
FN&N
262F
C2SE2A
1825
JP
NZ,AHOW
20322AC34E
1826
LD
Hl,
(ClIRRNT>
2635
E5
1827
PUSH
HL
2636
2AC54E
1828
LD
Hl,{STKGOS)
2639
E5
1829
PUSH
HL
203A
210000
1830
LD
HL,O
263D
22C94E
1831
LD
{LOPIIAR)
,
HL
2640
39
1832
ADD
HL,SP
2641
22C54E
1833
LD
(STKGOS)
,
HL
2644
C39625
1834
JP
RUNTSL
26472AC54E
1835
RETURN:
LD
HL,(STKGOS}
264A
7C
1836
LD
A,H
264B
B5
1837
OR
L
2b4C
CA8b2'1
18'"£
JP
I,
QWHAT
*I1ODCOMP
1-00
CROSS
ASSEMBLER*
HOt1E
VIDEO
GAME
SYSTEt'l
PAGE
22
ADDR
OBJECT
STt'lT
LABEL
OPeD
OPERAND
COI1t1ENT
2b4F
F9
1339
LD
SP,HL
2650
El
1840
?RESTO:
POP
HL
2651
22CS4E
1841
LD
{STKOOS1,HL
2654
El
1842
POP
HL
265522C34E
1843
LD
(CURRNT1,HL
26SS
Dl
1844
POP
DE
2659
CDBS2A
1845
CALLPOPA
26SC
F7
18%
RST
RSTFIN
1847
;
FOR
AND
NEXT
2650
CDD42A
1848
FOR:
CALL
PUSHA
2660
CD5329
1849
CALL
SETVAL
2663
2B
1850
DEC
HL
2664
22C94E
1851
.
LD
(LOPVAR)
,
HL
2667
1852
TSTCC
77H,FRIA
;
TO?
2bbA
D7
1853
FRl:
RST
RSTEXP
266B
22CD4E
1854
FRIA:
LD
{LOPIJITl,
HL
2bbE
210100
1855
LD
Hl.1
2671
1856
TSTCC
75H,FR4
j
STEP?
2674
D7
1857
RST
RSTEXP
267522CB4E
18SS
FR4:
lD
ilOPINC1,HL
2678
2AC34E
1859
LD
HL,
(CIJRRNT
I
267B
22CF4E
1860
lD
(lOPLN1,
HL
267E
EB
1861
EX
DE.HL
267F
22D14E
1862
lD
(lOPPTl,
HL
2682
010AOO
1863
LD
BC,IO
2bS5
2AC94E
1864
LD
HL,
(LOPVAR)
26SS
EB
1865
EX
DE,HL
2689
60
lSbb
LD
H,B
268A
68
1867
LD
L,B
268B
39
1868
ADD
HL,SP
26BC
1001
1869
JR
FR6-$
2bBE
09
1870
FRS:
ADD
HL,BC
268F
7E
1871
FR6:
LD
A,
(HLI
2690
23
1872
INC
HL
2691
B6
1873
OR
(HL)
2692
2817
1874
JR
Z,FR7-$
2694
7E
1875
LD
A,
(HL)
2695
2B
1876
DEC
HL
2696
BA
1877
CP
D
2697
2OF5
1878
JR
NZ,FR5-$
26997E
1879
lD
A,(HLI
269A
AB
1SS0
XOR
E
2698
20Fl
1881
JR
N1,FRS-$
269D
EB
ISS2
EX
DE,HL
269E
67
1SS3
LD
H,A
269F
6F
1884
LD
LA
26AO
39
1885
ADD
HL.SP
20AI
44
1886
LD
8,H
26A2
4D
ISS7
LD
e,l
26A3
210AOO
1SS8
LD
HL,10
2bA6
19
1SS9
ADD
HL,DE
20A7
CDA62A
1890
CALL
MVDOWN
26M
F9
1891
lD
SP,HL
20AB
2AD14E
1892
FR7:
LD
HL.
(LOPPTl
2bAE
EB
1893
EX
DE,HL
20AF
F7
1894
RST
RSTFIN
2680
CDEC29
1895
NEXT:
CALL
TSTV
fMOOCOMP
I-SO
CROSS
ASSEMBLER*
HOME
VIDEO
GAtE
SVSTEI1
PAGE
23
ADDR
OBJECT
STI1T
LABEL
OPCD
OPERAND
COI1t1ENT
26B3
DA8b29
1896
JP
C,QWHAT
26B6
22C74E
1897
lD
(VARNXTl,HL
26B9
D5
1898
NXl:
PUSH
DE
26BA
EB
1899
EX
DE,Hl
26BS
2AC94E
1900
LD
HL.
(LOPVAR)
2bB£
7C
1901
lD
A,H
26BF
B5
1902
OR
L
2bCO
CAS729
1903
JP
Z,AWHAT
2bC3
CD4D29
1904
CALL
COI'IP
26G6
2809
1905
JR
Z,NX2-$
26C8
Dl
1906
POP
DE
26C9
CDB82A
1907
CALL
POPA
2bCC
2AC74E
1908
LD
HL,
<VARNXTl
2bCF
lSES
1909
JR
NXl-$
26Dl
EB
1910
NX2:
EX
DE,Hl
2602
CDCC2F
1911
CAll
LDE
2605
bF
1912
LD
L.A
2606
13
1913
INC
DE
26D7
CDeC2F
1914
CALL
LDE
26DA
67
1915
LD
H,A
26DS
EB
1916
EX
DE,Hl
26De
2ACB4E
1917
LD
Hl,
(LOPINC)
26DF
E5
1918
PUSH
Hl
26£07C
1919
LD
A,H
26E1
AA
1920
XOR
D
26£27A
1921
LO
A,D
26£3
19
1922
ADD
Hl,DE
26E4
FAEB2b
1923
JP
!'I,NX3
26£7
AC
1924
XOR
H
26£8
FA1227
1925
JP
I1,NX5
2bEB
EB
1926
NX3:
EX
DE,Hl
26£C
2AC94E
1927
LD
Hl.
(LOPVAR)
26EF
7B
1928
LD
A,E
2bFO
CDE42F
1929
CALL
STHl
2bF323
1930
INC
Hl
2bF47A
1931
LD
A,D
2bF5CDE42F
1932
CALL
STHl
2bFS
2ACD4E
1933
LO
Hl,
(LOPLI1T>
2bFB
Fl
1934
POPAF
26FC
87
1935
OR
A
2bFD
F20127
1936
JP
P,NX4
2700
EB
1937
EX
DE,HL
2701
C04329
1938
NX4:
CALL
CKHlDE
2704
Dl
1939
POP
DE
2705
380D
1940
JR
C.NX6-$
27072ACF4E
1941
lD
HL,
(LOPLN)
27M
22C34E
1942
LD
(CURRtfT),HL
2700
2AD14E
1943
LD
HL.
(LOPPTl
2710
EB
1944
EX
DE,HL
2711
F7
1945
RST
RSTFIN
2712
El
1946
NX5:
POP
HL
2713
01
1947
POP
DE
2714
CDBS2A
1948
NX6:
CAll
POPA
2717
F7
1949
RST
RSTFIN
1950
i
REM,
IF,
INPUT,
LET
2718210000
1951
REM:
LD
HL,O
2718
1801
1952
JR
IFl-$
fI'IODCOt1P
Z-SO
CROSS
ASSEI'IBLER*
HOME
VIDEO
GAME
SVSTEt1
PAGE
24
ADM
OBJECT
SOO
LABEL
OPeD
OPERANO
COt1I1ENT
271D
07
1953
IFF:
RST
RSTEXP
271E
7e
1954
IF1:
LO
A,H
271F
B5
1955
OR
L
2720
C19D25
1956
JP
NZ,RUNSI'IL
2723
CDE229
1957
CALL
FNDSKP
2726
029625
1958
JP
NC,RUNTSL
2729
C3AF24
1959
JP
RSTART
272C
2AC74E
1960
II'olPERR:
LD
HL,(STKINP)
272F
F9
1961
LO
SP,HL
2730
El
1962
POP
HL
2731
22C34E
1963
LO
(CURRNTl,HL
2734
01
1964
POP
DE
2735
01
1965
POP
DE
)2736
1966
INPUT
EQU
$
2736
OS
1967
IP1:
PUSH
DE
2737CD082B
1968
CALL
QTSTG
273A
1823
1969
JR
IPB-$
273C
CDEC29
1970
IP2:
CALL
TSTV
273F
3817
1971
JR
C,IP5-$
2741
CD6F27
1972
IP3:
CALL
IP12
2744
I1D44E
1973
LD
DE,BUFFER
2747
D7
1974
RST
RSTEXP
2748
D1
1975
POP
DE
2749
EB
1976
EX
DE,HL
274A
7B
1977
LD
A,E
2748
CDE42F
1978
CALL
STHL
274E
23
1979
INC
HL
274F
7A
1900
LD
A,D
2750
CDE42F
1981
CALL
SUt
2753
El
1982
IP4:
POPHL
2754
22C34E
1983
LD
i
CURRNT)
I
HL
2757
01
1984
POP
DE
2758
F1
1985
IP5:
POP
AF
2759
1986
IP6:
TSTC
",',IP7
275C
18DS
1987
JR
INPUT-$
275E
F7
1988
IP7:
RST
RSTFIN
275F
OS
1989
IPS:
PUSH
DE
2760
CDEC29
19%
CALL
iSTV
2763
3(}O3
1991
JR
NC,IPl1-$
2765
C38629
1992
IPIO:
JP
QWHAT
2768
43
1m
IPll:
LD
B,E
2769
D1
1994
POP
DE
27M
CD242B
1995
CALL
PRTCHS
276D
18D2
1996
JR
IP3-$
276F
C1
1997
IP12:
POP
Be
2770
OS
1998
PUSH
DE
2771
EB
1999
EX
DE,HL
2772
2AC34E
2000
LD
HL,
(CURRNn
2775
E5
2001
PUSH
HL
2776213627
2002
LD
HL,IPI
2779
22C34E
2003
LD
(CURRNTl.HL
277C
210000
2004
LD
HL,O
277F
39
2005
ADD
HL,SP
27SO
22C74E
2006
LD
(STl<INP),
HL
2783
OS
2007
PUSH
DE
2784
C5
2008
PUSH
Be
2785
3£20
2009
LD
A,"
t
*1100C0t1P
Z-SO
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
25
ADDR
OBJECT
STI1T
lABEL
OPCD
OPERAND
COIt1ENT
2787
C3F02B
2010
JP
GETLM
278A
lA
2011
DEFlT:
LD
A,
(DE)
27B8
FEOD
2012
CP
CR
278D 28CF
2013
JR
Z,IP7-$
27BF
C3B629
2014
JP
QWHAT
2015
i
**
EXPR
**
2792
CODA27
2016
EXPR:
CAll
EXPRl
2795
E5
2017
PUSH
Hl
2796210928
2018
LD
Hl,TABb-l
2799
C34F25
2019
JP
EXEC
279C
CDC527
2020
XPRl:
CAll
XPRS
279F
DB
2021
RET
C
27AO
6F
2022
lD
L.A
27Al
C9
2023
RET
27A2
CDC527
2024
XPR2:
CAllXPR8
27A5
CB
2025
RET
Z
27M
6F
2026
LD
l,A
27A7
C9
2027
RET
27AS
CDC527
2028
XPR3:
CAll
XPRB
27AB
CB
2029
RET
Z
27AC
DB
2030
RET
e
27AD
6F
2031
LD
l,A
27AE
C9
2032
RET
27AF
CDr..527
2033
XPR4:
CAll
XPRB
2781
6F
2034
lD
LA
27133
C8
2035
RET
Z
27B4
DB
2036
RET
C
27B5
bC
2037
lD
l,H
27Bb
C9
2038
RET
2187
CDC527
2039
XPR5:
CAll
XPRB
218A
eo
2040
RET
HZ
2788
bF
2041
lD
l.A
27BC
C9
2042
RET
2780
CDC527
2043
XPRb:
CAll
XPRB
27CO
DO
2044
RET
HC
27Cl
6F
2045
LD
LA
27C2
C9
2046
RET
27C3
El
2047
XPR7:
POP
Hl
27C4
C9
2048
RET
27C5
79
2049
XPRB:
LD
A,e
27Gb
El
2050
POP
Hl
27C7
Cl
2051
POP
Be
27C8
E5
2052
PUSH
Hl
27C9
C5
2053
PUSH
Be
27CA
4F
2054
lD
C,A
27CB
CODA27
2055
CAlL
EXPRI
27CE
EB
2056
EX
DE,Hl
27CF
E3
2057
EX
(SP),Hl
2700
CD4329
2058
CAlL
CKHlDE
2703
D1
2059
POP
DE
2704
210000
2060
LD
Hl,O
2707
SEO!
2061
LD
A,l
27D9
C9
2062
RET
27DA
2063
EXPRl:
TSTC
,_/ I
XPll
270D
210000
2064
LD
Hl,O
27E0
1821
2065
JR
XP16-$
27E2
2066
XPll:
TSTC
l+",XP12
-
--.---,,-~
"~.----.
*I'IODCOI'1P
z-oo
CROSS
ASSEMBlER*
HOME
VIDEO
GAI'IE
SYSTEM
PAGE
26
ADDR
OBJECT
sm
LABEL
OPCD
OPERAND
COI'IMENT
21£5
COOC28
2067
XP12:
CALL
EXPR2
27E8
2068
XP13:
TSTC
'+',XP15
27EB
E5
2069
PUSH
HL
27EC
COOC28
2070
CALL
EXPR2
27EF
EB
2071
XPI4:
EX
DE,HL
27FO
E3
2072
EX
(SP),HL
27Ft
7C
2073
LD
A,H
27F2
AA
2074
XOR
D
27F37A
2075
LD
A,D
27F4
19
2076
ADD
HL,DE
27F5
Dl
2077
POP
DE
27F6
FAEB27
2078
JP
f1,XP13
27F9
AC
2079
XOR
H
27FA
F2EB27
20B0
JP
P,XP13
27FD
C38D2A
2081
JP
QHOW
2800
2082
XPI5:
TSTC
'-',XPR9
2003
E5
2083
XPI6:
PUSH
HI..
2004
COOC28
2084
CALL
EXPR2
2007
CD2E29
20B5
CALL
CHGSGN
2SOA
lSE3
2086
JR
XPI4-$
2BOC
CD7128
2087
EXPR2:
CALL
EXPR3
200F
2000
XP21:
TSTCC
b2H,XP24
2812
E5
2089
PUSH
HI..
2813
CD7128
2090
CALL
EXPR3
2816
0600
2091
LD
8,0
2818
CD2B29
2092
CALL
CHKSGN
2818
E3
2093
EX
(SP),
HL
281C
CD2B29
2094
CALL
CHKSGN
281F
EB
2095
EX
DE,HI..
2B20
E3
2096
EX
(SP),HL
2821
7C
2097
LD
A.H
2822
87
2098
OR
A
2823
2006
2099
JR
Z,XP22-$
2825
7A
2100
LD
A,D
2826
B2
2101
OR
D
2827
EB
2102
EX
DE,HL
2828
C28E2A
2103
JP
NZ,AHQW
282B
7D
2104
XP22:
LD
A,L
282C
210000
2105
LD
HL,O
W.lF
87
2106
OR
A
2830 2832 2107
JR
Z,XP25-$
2832
19
2108
XP23:
ADD
HL,DE
2S33
DASE2A
2109
..
If'
C,AHOW
2836
3D
2110
DEC
A
28372OF9
2111
JR
NZ,XP23-$
2S39
1829
2112
JR
XP25-$
283B
2113
XP24:
TSTCC
63H,XPR9
283E
E5
2114
PUSH
HI..
283F
CD7128
2115
CALL
EXPR3
2842
0600
2116
LD
8.0
2844
CD2B29
2117
CALL
CHKSGN
2847
E3
2118
EX
(SP),HL
2848
CD2829
2119
CALL
CHKSGN
2848
EB
2120
EX
DE,HL
2S4C
E3
2121
EX
(SP)
I
HI..
284D
EB
2122
EX
DE,Hl..
2S4E
7A
2123
LD
A,D
*I'IODCOI1F'
1-80
CROSS
ASSEMBlER*
HOME
VIDEO
GAME
SYSTEI'I
PAGE
27
ADOO
OBJECT
STMT
LABEL
OPeD
OPERAND
COI'IMENT
284F
B3
2124
OR
E
2850
CASE2A
2125
JP
I.
AHOW
2953
C5
2126
PUSH
Be
2954
COI629
2127
CALL
DIVIDE
2957
01
2128
POP
DE
i
SIGN
STUFF
TO
DE
2B5S
C5
.2129
PUSH
BC
i
SAVE
DIVIDE
RESULT
2959
CB7A
2130
BIT
7.D
j
WAS
SIGN
SET?
2B5B
C42E29
2131
CALL
NZ.
CHGSGN
j
YEP
-
CHANGE
2B5E
22AE4E
2132
LD
(REMAIN}.HL
;
STUFF
IT
2861
El
2133
POPHL
j
RESULT
TO
HL
2862
42
2134
LD
B,D
;
copy
OVER
SIGN
STUFF
2Sb3
4B
2135
LO
C,E
2S64
01
2136
XP25:
POP
DE
2865
7C
2137
LD
A,H
2806
B7
2138
OR
A
2867
FA8D2A
2139
JP
M,QHOW
286A
78
2140
LO
A,B
286B
B7
2141
OR
A
2SbC
FC2E29
2142
CALL
M.
CHGSGN
28bF
1S9E
2143
JR
XP21-$
2871
21B02B
2144
EXPR3:
LD
HL,
TAB3-1
2874
C34F25
2145
JP
EXEC
2877
CDEC29
2146
HOTF:
CALL
TSTV
287A
3SOE
2147
JR
C.
XP'32-$
287C
EB
2148
EX
DE.HL
2870
CDCC2F
2149
CALLLDE
2S8O
F5
2150
PUSH
AF
2001
13
2151
INC
DE
2882
CDCC2F
2152
CALLLDE
28B5
EB
2153
EX
DE,HL
288667
2154
LO
H.A
2887
F1
2155
POPAF
2888
bF
2156
LD
L.A
2889
C9
2157
RET
288A
CDb22A
2158
XP32:
CALL
TSTNUI'I
200D
78
2159
LD
AlB
2asE
B7
2160
OR
A
28SF
CO
2161
RET
HZ
2162
j
SINGLE
CHAR
STRING
CONSTANT?
2890
2163
TSTC
'H/,PARN
i
HAVE
WE
GOT
QUOTES?
2893
CDCC2F
2164
CALL
LOE
2896
bF
216S
LD
L,A
j
FAILED
TSTNUM
SET
H
TO
ZERO
2897
13
2106
INC
DE
2898 2167
TSTC
'H/,XPRO
i
ERROR
IF
NO
TRAILING
2898
C9
2168
RET
289C
2169
PARN:
TSTC
'('.XPRO
289F
D7
2170
PARNP:
RST
RSTEXP
28AO
2171
TSTC
'}'.XPRO
28A3
C9
2172
XPR9:
RET
28A4
C3S629
2173
XPRO:
JP
QWHAT
28A7
EF
2174
RHO:
RST
RSTPAR
28A8
7C
2175
LD
A.H
28A9
B7
2176
OR
A
28M
FASD2A
2177
JP
M.QHOW
2eAO
B5
2178
OR
L
28AE
CASOlA
2179
JP
Z.QHOW
2881
D5
2180
PUSH
DE,
*f1ODCOMP
z-oo
CROSS
A.SSEMBlER*
HOr1E
VIDEO
GAt1E
SYSTEl1
PAGE
28
ADDR
OBJECT
snIT
lABEL
OPCD
OPERAND
COMMENT
28B2
EB
2181
EX
DE,HL
i
DE
=
RANGE
28B3
AF
2182
XOR
A
28B4
2183
SYSTEM
RANGED
2SB6
OF
2184
LD
L,A
2SB7
AF
2185
XOR
A
2SBS
2186
SYSTEl1
RANGED
28BA
67
2187
LD
H,A
2188
j
HL
=
RANDOM
#
2SBB
co
2189
PUSH
Be
2SBe
CD1629
2190
CALL
DIVIDE
2SBF
Cl
2191
POP
Be···
2SC0
Dl
2192
POP
DE
2OC1
23
2193
INC
HL
2SC2
C9
2194
RET
28C3
EF
2195
ABS:
RST
RSTPAR
2SC4
1B
2196
DEC
DE
2SC5
CD2B29
2197
CALL
CHKSGN
28CS
13
2193
INC
DE
2SC9
C9
2199
RET
2SCA
2A524E
2200
SIZE:
LD
HL,nXTUNF)
2SCD
DS
2201
PUSH
DE
2SCE
EB
2202
EX
DE,HL
2SCF
21OCA7
2203
LD
HL,DFTLMT
28D2
A7
2204
AND
A
28ro
ED52
2205
SBe
HLOE
28DS
01
2206
POP
DE
2SDb
C9
2207
RET
2208
j
FUNCTION
TO
SENSE
DIAL
VALUE
2807
3EtB
2209
GETPOT:
LD
A,lBH
2809
C00929
2210
CALL
CHKRNG
i
GET
DATA
2SDC
2F
2211
CPL
2SDDDbOO
2212
SUB
SOH
2SDF
OF
2213
LD
L,A
2214
;
FALL
INTO
...
2215
i
SIGN
EXTEND
SUBROUTINE
2SE0
2600
2216
SGNEXT:LD
H,O
2SE2
7D
2217
LD
A,L
2SE3
A7
2218
AND
A
28E4
FO
2219
RET
P
2SE5
25
2220
DEC
H
2SEb
C9
2221
RET
2222
j
FUNCTION
TO
SENSE
STATE
OF
TRIGGER
28E7
COO729
2223
GETTRG:
CALL
CHKRNI
28EAEblO
2224
AND
100
2SEC
C8
2225
RET
Z
2SED
2C
2226
INC
L
2SEE
C9
2227
RET
2228
;
FUNCTIONS
TO
RETURN
.JOYSTICK
VALUE
2229
j
THESE
FUNCTIONS
RETURN
EITHER
+1,
,0
OR
-1,
DEPENDING
2230
;
ON
JOYSTICK
STATE
2SEF
C00729
2231
GETJX:
CALL
CHKRN1
i
PARM
IN
RANGE?
28F2
OF
2232
MeA
2SF3
OF
2rJ3
RRCA
28F4
OF
2234
MeA
28F5
3SOE
2235
.JR
C,GETJY3-$
28F7
OF
2236
RRCA
2SF8
3P.A)7
2237
JR
C.GETJY1-$
ftIODCOMP
Z-SO
CROSS
ASSEt1BLER*
HOt1E
VIDEO
GAME
SVSIDI
PAGE
29
ADDR
OBJECT
SOO
lABEL
OPCD
OPERAND
COMtIENT
23FA
C9
2238
RET
2239
i
ENTRV
FOR
V
JOYSTICK
VALUE
28FB
C00729
2240
GETJV:
CAll
CHKRNI
23FE
OF
2241
RRCA
28FF3002
2242
JR
NC.GETJV2-$
2901
23
2243
GETJV1:
INC
Hl
2902
C9
2244
RET
2903
OF
2245
GETJY2:
RRCA
2904
00
2246
RETNC
29052B
2247
GETJV3:
DEC
HI..
2906
C9
2248
RET
2249
;
SUBROUTINE
TO
GET
PARAMETER
BETWEEN
1
AND
4
29073EOF
2250
CHKRNl:
LD
A.OFH
2909
C5
2251
CHKRNG:
PUSH
Be
29M
FS
2252
PUSH
AF
290B
EF
2253
RST
RSTPAR
290C
Fl
2254
POPAF
290D
as
2255
ADD
A,l
290E
4F
2256
LD
C,A
290F
ED78
2257
IN
A,
(C)
2911
Cl
2258
POP
Be
2912
210000
2259
lD
HL.O
2915
c."9
2260
RET
2261
j
DIVIDE,
SUBDE.
CHKSGN,
CHGSGN,
CKHlDE
2910
E5
2202
DIVIDE:
PUSH
Hl
2917
be
2263
LD
l,H
2918
2600
2264
LD
H.O
291A
CD2129
2205
CALL
DVI
291D
41
2266
LD
B,C
291E
7D
2267
LD
A,l
291F
El
2268
POP
Hl
292067
2269
LD
H.A
2921
OEFF
2270
DVl:
LD
C,-1
2923
OC
2271
M'
....
INC
C
2924
A7
2272
AND
A
2925
EDS2
2273
SBe
Hl,DE
2927
30FA
2274
JR
NC.DV2-$
2929
19
2275
ADD
Hl.DE
292A
C9
1:276
RET
292B
7C
2277
CHKSGN:
LD
A,H
292C
B7
2278
OR
A
292D
FO
2279
RET
P
292E
7C
2200
CHGSGN:
lD
A,H
292F
BS
2281
OR
L
2930
C8
2282
RET
Z
2931
7C
2283
lD
A.H
2932
F5
2284
PUSH
AF
2933
2F
2...""S5
CPL
293467
2286
lD
H,A
29"'...5
7D
2287
lD
A.l
2936
2F
2288
CPL
2937
bF
2289
LD
L.A
2938
23
2290
INC
Hl
2939
Fl
2291
POP
AF
293A
AC
2292
XOR
H
293B
F28D2A
2293
JP
P,QHOW
293E
78
2294
LD
A,B
*t1ODCOMP
I-SO
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
30
ADDR
OBJECT
Soo
LABEL
OPCD
OPERAND
COMMENT
293F
EESO
2295
XOR
SOH
2941
47
2296
LD
B.A
2942
C9
2297
RET
29437C
2298
CKHLDE:
LD
A.H
2944
AA
2299
XOR
D
2945
F24929
2300
JP
P.CKl
2948
EB
2301
EX
DE.HL
2949
CD4D29
2302
CKl:
CALL
COMP
294C
C9
2303
RET
294D
7C
2304
COI'IP:
LD
A.H
294E
BA
2305
CP
D
294F
CO
2306
RET
NI
2950
7D
2307
LD
A,L
2951
BB
2308
CP
E
2952
C9
2309
RET
2310
;
SETVAL,
FIN,
AND
ERROR
2953
CD0E22
2311
SETVAL:
CALL
TSTVFF
295b
2312
TSTC
'=',QWHAT
2959
E5
2313
SEW
1:
PUSH
HL
295A
D7
2314
RST
RSTEXP
295B
44
2315
LD
B,H
295C
4D
2316
LD
C,L
295D
El
2317
POP
HL
mE
F5
2318
PUSH
AF
295F
79
2319
LD
A.C
2960
CDE42F
2320
CALL
STHL
2963
23
2S'21
INC
HL
2964
78
2322
lD
A.
B
2965
CDE42F
2323
CALL
srI'lL
2968
Fl
2324
POP
AF
2969
C9
2325
RET
296A
CD6F29
2326
FINISH:
CALL
FIN
296D
1817
2327
JR
QWHAT-$
296F
2328
FIN:
TSTC
'; '.FI1
2972
F1
2329
POPAF
2973
C39D25
2330
JP
RUNSI1L
2976
2331
FI1:
TSTCC
CR.FI2
2979
F1
2332
POP
AF
297A
C3SD25
2333
JP
RUNNXL
297D
CDCC2F
2334
IGNBLK:
CALL
LDE
29SO
FE20
2335
CP
I ,
2982
CO
23.%
RET
HI
29S3
13
2337
INC
DE
2984
18F7
2338
JR
IGNBLK-$
2986
D5
2339
QWHAT:
PUSH
DE
2987
113520
2340
AWHAT:
LD
DE.HT
29SA
CDSA2C
2341
ERROR:
CALL
CRLF
298D
CDFD2A
2342
CALL
PRTSTG
2990
2AC34E
2343
LD
HL.
(CURRNT>
2m
E5
2344
PUSH
HL
2994
EB
2345
EX
DE,HL
2995
CDCC2F
2346
CALL
LDE
me
67
2347
LD
H.A
2999
13
2348
INC
DE
mA
CDCC2F
2349
CALLLDE
mD
B4
2350
OR
H
mE
EB
2351
EX
DE.HL
IMODCOI'IP
Z-SO
CROSS
ASSEI'IBLER*
HOME
VIDEO
GAt1E
SYSTEtl
PAGE
31
ADDR
OBJECT
STMT
LABEL
OPCD
OPERAND
COI'ItIENT
299F
D1
2352
POP
DE
29AO
CAA924
2353
JP
Z.
TELL
29A3
ES
2354
EX
DE,HL
29M
CDCC2F
2355
CAlLLDE
29A7
EB
2356
EX
DE.HL
29AS
S7
2357
OR
A
29A9
FA2C27
2358
JP
I'I,INPERR
29AC
C06B2B
2359
CAlL
PRTLN
29AF
C1
2360
POPBC
29BO
41
2361
LD
S,C
29Bl
C0242B
2%2
CALL
PRTCHS
29B43E3F
2363
LD
A
/1'
. .
2986
OF
2364
.
RST
RSTOCH
29B7
CDFD2A
2365
CAlL
PRTSTG
29BA
C3A924
2%6
JP
TELL
29BD
05
'P..J-7
QSORRV:
PUSH
DE
29BE
114020
2368
ASORRV:
LD
DE,SQRRV
29C1
lac7
rJ69
JR
ERROR-$
2370
;
FNDLN
29C3
7C
2371
FNDLN:
LD
A,H
29C4
B7
2372
OR
A
29C5
FASD2A
2373
JP
I'I,QHOW
29CB
l100A0
2374
LD
DE,
TEXT
29CB
13
2375
FNDLP:
INC
DE
29CC
CDCC2F
2376
CALL
LDE
29CF
4F
2377
LD
C,A
2900
IS
2378
DEC
DE
29D1
87
2379
ADD
A,A
2902
DB
2380
RET
C
29D3
CDCC2F
2381
CALL
LDE
2906
95
2382
SUB
L
29D747
2383
LD
B,A
29DS
13
2384
INC
DE
2909
79
2385
LD
A,C
29DA
9C
2386
SBC
A,H
29DB
3.'304
2387
JR
C.FU-$
29DD
IB
23SB
DEC
DE
29DE
SO
2389
OR
B
290F
C9
2390
FI2:
RET
19£0
13
2391
FNDNXT:
INC
DE
29E1
13
2392
FL1:
INC
DE
29E2
CDCC2F
2393
FNDSKP:
CALL
LDE
29E5
FEOD
2394
CP
CR
29E7
20FS
2395
JR
NZ,FLl-$
29E9
13
2396
INC
DE
19£A
18DF
2397
JR
FNDLP-$
29EC
E7
2398
TSTV:
RST
RSTIGN
29ED
FE25
2399
CP
'%'
;
PEEK
-POKE?
29EF
WID
2400
JR
Z,TSTVO-$
29F1
D640
2401
SUB
'@'
29F3
DB
2402
RET
C
29F4201C
2403
JR
NZ,TV1-$
29F6
13
2404
INC
DE
29F7
EF
2405
RST
RSTPAR
29FS
29
2406
ADD
I-L,HL
29F9
DASD2A
2407
JP
C,QHOW
29FC
D5
2408
TSTB:
PUSH
DE
----.--~
~--
- -
---
--
.....
-.-
,,~_."'_~,.
______
o,~
*t1ODCOMP
1-80
CROSS
ASSEMBLER*
HOI'IE
VIDEO
GAME
SYSIDI
PAGE
32
ADDR
OBJECT
STHT
LABEL
OPeD
OPERAND
COMMENT
29FD
EB
2409
EX
DE.HL
29FE
COCAlS
2410
CAll
SIIE
2AOl
CD4D29
2411
CAlL
cot1P
ZA0438BS
2412
JR
C,ASORRY-$
2AOb
2A524E
2413
lD
HL.
iTXTUNF)
2A09
2B
2414
DEC
HL
ZAOA
2B
2415
DEC
HL
ZAOB
19
2416
ADD
HL.DE
2AOC
Dt
2417
POP
DE
ZAOD
C9
2418
RET
2419
;
7.(ADDR)
PEEJ(-POKE
CAlL
2AOE
13
2420
TSTVO:
INC
DE
2AOF
EF
2421
RST
RSTPAR
;
GET
ADDR
2A10
AF
2422
XOR
A ;
CLEAR
CV
2All
C9
2423
RET
;
AND
00
BACK
2M2
FEIB
2424
TVl:
CP
27
2A14
3F
2425
CCF
2A15
00
242b
RET
C
2A16
13
2427
INC
DE
2428
IS
SECOND
CHARACTER
ALSO
ALPHA?
2A17
OF
2429
LD
l.A
;
SAVE
FIRST
ONE
2Ala
COCC2F
2430
CAlL
LDE
2A1B
FE41
2431
CP
'A'
2AtD
3S2b
2432
JR
C.DEW4-$
;
IF
NOT
IN
RANGE
A-I
2AIF
FE5B
2433
CP
'1'+1
2A21
3022
2434
JR
NC,DEW4-$
;
THEN
DONT
SEARCH
2A23
C5
2435
PUSH
Be
2A24
D5
2436
PUSH
DE
2AZ567
2437
LD
H,A
;
SECOND
CHAR
TO
H
2A2b
0607
2438
LD
B,PARNUI'I
i B -
ITERATION
CTR
2AZ8
l1A220
2439
LD
DE,DEVLST
;
DE
-
SEARCH
TABLE
2A2B
IA
2440
DEWt
LD
A,
(DE)
j
GET
FIRST
ENTRY
2AZC
13
2441
INC
DE
2AZD
BD
2442
CP
L
2AZE
lA
2443
LD
A,
(DE)
2A2F
13
2444
INC
DE
2A30200B
2445
JR
NZ,DEW2-$
2A32
Be
2440
CP
H
2A33
2008
2447
JR
NZ,DEW2-$
2448
;
f1ATCH
FOUND
-
FIGURE
OUT
LOOKUP
INDEX
2A35
78
2449
LD
A,B
2A36
CblA
2450
ADD
A,26
2A3S
OF
2451
LD
L,A
2A39
Dl
2452
POP
DE
2A3A
13
2453
INC
DE
;
B\JI'f
CHAR
PTR
2A3B
1807
2454
JR
DEW3-$
2455
i
f1ISf1ATCH
-
lOOP
BACK
IF
POSS
2A3D
lOEC
2456
DEW2:
DJNZ
DEW1-$
2457
j
NOT
POSSIBLE
-
RETURN
NOT
A
VAR
2A3F
Dl
2458
POP
DE
2A40
C1
2459
POP
Be
2Ml
IB
2460
DEC
DE
;
BACKUP
TO
CHAR
START
2A42
37
2461
SCf
j
SET
CARRV
2M3
C9
2462
RET
2A44
Cl
2463
DEW3:
POP
Be
2M57D
2464
DEW4:
LD
A,l
2A4b
216C4£
2465
LD
HL.VAROON-2
*I'IOOCOI'IP
Z-80
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
33
ADDR
OBJECT
SmT
lABEL
OPCD
OPERAND
COI'II'IENT
2A4907
2406
RLCA
2A4A
85
2407
ADD
A,l
2A4B
bF
2%8
lD
L.A
2A4C
3£00
2469
LD
A,O
2A4E
8C
2470
ADC
A,H
2A4F
67
2471
LD
H,A
2A5O
C9
2472
RET
2473
i
TSTCH
AND
TSTNUM
lASl
E3
2474
TSTCH:
EX
(SP),HL
2A52
E7
2475
RST
RSTIGN
2A53
BE
2476
CP
(HU
2A5423
2477
INC
HL
2A552807
2478
JR
Z,
TC1-$
2A57
C5
2479
PUSH
Be
2ASS
4E
2480
LD
C,
(HL)
2A59
0600
2481
LD
B,O
2A5B
09
2482
ADO
HL,Be
2ASe
C1
2483
POP
Be
2A5D
IB
2484
DEC
DE
2A5E
13
2485
TC1:
INC
DE
2A5F
23
2486
INC
HL
2A60
E3
2487
EX
(SP},HL
2A61
C9
2488
RET
2A6221oooo
2489
TSTNUM:
LD
HL.O
2A65
44
2490
lD
B,H
2A66
E7
2491
RST
RSTIGN
2Ab7
FE30
2492
TN1:
CP
'0'
2A69
08
2493
RET
C
2AM
FE3A
2494
CP
3AH
2A6C
DO
2495
RET
NC
2A60
3EF0
2496
lD
A,OFOH
2A6F
A4
2497
AND
H
2A70
201B
2498
JR
NZ,QHOW-$
2An
04
2499
INC
B
2A73
('5
2500
PUSH
Be
2A74
44
2501
lD
B,H
2A75
40
2502
LO
C,l
2A7629
2503
ADD
HL.Hl
2A77
29
2504
ADD
HL,HL
2A7809
2505
ADD
HL,Be
2A79
29
2506
ADD
HL,HL
2A7A
COCC2F
2507
CALLLDE
2A7D
13
2508
INC
DE
2A7E
EbOF
2509
AND
OOFH
2ASO
S5
2510
ADD
A,L
2AS1
bF
2511
lO
L,A
2M23£00
2512
LD
A,O
2M4
8C
2513
AOC
A,H
2A85
67
2514
LD
H,A
2A86
C1
2515
POP
Be
2M7
CDf'.£2F
2516
CALLLDE
2A8A
F2672A
2517
JP
P,TN1
2MD
05
2518
QHOW:
PUSH
DE
2A8E
113B20
2519
AHOW:
LD
DE,HOW
2A91
C38A29
2520
JP
ERROR
2521
i
t1VIJP
I
1'MlOWN,
POPA.
AND
PUSHA
2A94
CD4D29
2522
I'1VUP:
CALL
COMP
*MODCOf'IP
z-so
CROSS
ASSEt1BI..ER*
HOME
VIDEO
GAME
SVSTEI1
PAGE
34
ADDR
OBJECT
STI1T
LABEL
OPeD
OPERAND
COMHENT
2A97
C8
2523
RET
Z
2A9S
CDCC2F
2524
CALL
LDE
2A9B
E5
2525
PUSH
II.
2A9C
60
2526
LD
H.B
2A9D
69
2527
LD
L.C
2A9E
CDE42F
2528
CALL
8M
2AAI
E1
2529
POP
II.
2M2
13
2530
INC
DE
2M3
03
2531
INC
Be
2AA4
1SEE
2532
JR
11VUP-$
2AM
78
2533
I'IVDOWN:LD
A.B
2M792
2534
SUB
D
2AAS
C2AE2A
25.35
JP
NZ.MDl
2MB
79
253b
LD
A.C
2AAC
93
2537
SUB
E
2AAD
C8
253S
RET
Z
2AAE
IB
2539
MDl:
DEC
DE
2AAF
2B
2540
DEC
HL
2ABO
CDCC2F
2541
CALL
LDE
2AB3
CDE42F
2542
CALL
STHL
2ABb
1SEE
2543
JR
I'IVDOWN-$
2ABS
C1
2544
POPA:
POP
Be
2AB9
El
2545
POP
II.
2ABA
22C94E
2546
LD
(LOPVAR),HL
2ABD
7e
2547
LD
A.H
2ABE
B5
2548
OR
L
2ABF
CAD22A
2549
JP
Z,PPl
2AC2
El
2550
POP
II.
2AC3
22CB4E
2551
LD
(LOPINO,
II.
2ACb
El
2552
POP
HL
2AC7
22CD4E
2553
LD
(LOPLt1T),HL
2ACA
E1
2554
POP
II.
2ACB
22CF4E
2555
LD
(LOPLN}.
II.
2ACE
El
2556
POP
II.
2ACF
22D14E
2557
LD
(LOPPD.HL
2AD2
C5
2558
PPi:
PUSH
Be
2AD3
C9
2559
RET
2AD4215C4F
2560
PUSHA:
LD
HL,STKLMT
2AD7
CD2E29
2561
CALL
CH(;sGN
2ADA
Cl
2562
POP
Be
2ADB
39
2563
ADD
HL,SP
2ADe
D2BD29
2564
JP
NC,QSORRV
2ADF
2AC94E
2565
LD
11.,
(LOPVAR)
2AE2
7C
2566
LD
A.H
2AE3
B5
2567
OR
L
2AE4
CAFA2A
2"".J68
JP
Z,PUl
2AE72AD14E
2569
LD
11.,
(LOPPT)
2AEA
E5
2570
PUSH
II.
2AEB
2ACF4E
2571
LD
11..
(LOPLN)
2AEE
E5
2572
PUSH
II.
2AEF
2ACD4E
2573
LD
11.,
iLOPLI1T)
2AF2
E5
2574
PUSH
II.
2AF32ACB4E
2575
LD
11..
(LOPINC)
2AF6
E5
2576
PUSH
II.
2AF72AC94E
2577
LD
11..
(LOPVAR)
2AFA
E5
2578
PUt:
PUSH
II.
lAFB
C5
2579
PlJSI1
Be
*I'IODCOMf'
Z-SO
CROSS
ASSB1BLER*
HM
VIDEO
GAf£
SYSTB1
PAGE
35
ADDR
OBJECT
sniT
LABEL
OPCD
OPERAND
COtt1ENT
lAFC
C9
2580
RET
2581
i
PRTSTG,
QTSm,
PRTNUI'I,
PRTLN
2AFD
97
2582
PRTSTG:
SU8
A
2AFE
47
2583
PSI:
LD
B,A
2AFF
CDI'..t2F
2584
PS2:
CALL
LDE
2002
13
2585
INC
DE
2003
BS
2586
CP
B
2B04
C8
2587
RET
Z
2005
OF
2588
RST
RSTOCH
2BOb
FEOD
2589
CP
CR
200s
2OF5
2590
JR
NZ,PS2-$
2BOA
C9
2591
RET
200B
2592
QTST6:
TSTe
1"',/;/T3
200E
3E22
2593
LD
A,
........
2B10
CDFE2A
2594
QT1:
CALL
PSI
2B13
FEOD
2595
QT2:
CP
CR
2815
E1
2596
POP
HI..
2816
CASD25
2597
JP
Z,RUNNXL
2819
23
2598
INC
HI..
281A
23
2599
INC
HI..
2B1B
E9
2600
JP
(HI..)
2BtC
2601
Q13:
TSTCC
027H,
QT5
281F
3El7
2602
LD
A,027H
2811
18ED
2603
JR
QT1-$
2B23
C9
2604
QT5:
RET
28247B
2605
PRTCHS:
LD
A,E
2B25
BS
2606
CP
B
2B2b
C8
2607
RET
Z
2827
COCC2F
2608
CALL
LDE
2B2A
OF
2609
RST
RSTOCH
2818
13
2610
INC
DE
2B2C
18F6
2611
JR
PRTCHS-$
}2BlE
2612
PRTNUIi
EOO
$
2BlE
0600
2613
00:
LD
8,0
2B3O
CD2B29
2614
CALL
CHKSGN
2833
F2392B
2615
JP
p,PN4
2836
062D
2:61b
LD
B,
I_I
2B38
OD
2617
DEC
C
2839
D5
2618
PN4:
PUSH
DE
283A
l10A00
2619
LD
DE,10
2B3D
D5
2620
PUSH
DE
2B3E
OD
2621
DEC
C
2B3F
C5
26~t2
PUSH
Be
2840
CD1629
2623
PN5:
CALL
DIVIDE
2843
78
2624
LD
A,B
2844
81
2625
OR
C
2B45
CA4F2B
2626
JP
Z,PNb
2B48
E3
2627
EX
(SP),HI..
2849
2D
2628
DEC
L
2B4A
E5
2629
PUSH
HI..
2B4S
60
2630
LD
H,S
284C
69
2631
LD
L.e
2B4D
18F1
2632
JR
PN5-$
2B4F
C1
2633
PN6:
POP
Be
2B5O
OD
2634
PN7:
DEC
C
2851
79
2635
LD
A,C
285287
2636
OR
A
*"OOO)IP
I-SO
CROSS
ASSaIBlER*
HOI£
VIDEO
GAt£
SYSTEI1
PAGE
36
ADDR
OBJECT
SlltT
LABEL
OPCD
OPERAND
COJKNT
2B53
FA5B2B
2637
JP
",PHS
2B56
3E20
2638
LD
A,' I
2858
DF
2639
RST
RSTOCH
2859
18F5
2b40
JR
PN7-$
285B
78
2641
PHS:
LD
A,B
2B5C
B7
2642
OR
A
2B5D
C48C2C
2643
CAlL
NZ,
OUTCH
2B6O
5D
2644
LD
E,L
2861
7B
2645
PN9:
LD
A,E
2862
FEOA
2646
CP
10
2B64
D1
2647
POP
DE
2B65
CS
2648
RET
Z
2B66
C630
2649
ADD
A,'O'
2B68
DF
2650
RST
RSTOCH
286918F6
2651
JR
PN9-$
2B6B
CDCC2F
2652
PRTLN:
CALL
LDE
2B6E
OF
2653
LD
L.A
2B6F
13
2654
INC
DE
2870
CDCC2F
2655
CALL
LIE
287367
2656
LD
H,A
2874
13
2657
INC
DE
2B75
0E04
2658
LD
C,4
2877
CD2E2B
2659
CALL
PRTtUI
287A
EO
2660
LD
A,'
,
2B7C
DF
2661
RST
RSTOCH
2B7D
C9
2662
RET
2B7E
2663
TAB2:
ITEM
'TV',
PUleD
2B82
2664
ITEM
'1tJ
I ,
PUTItJ
2B86
2665
lTE11
'1t'.PUTIO
2B89
2666
ITEI'!
'CALL
I.
DOCAlL
2B8F
2667
ITEM
'. "
ReI
2B92
2668
lTEI1
'$'.
BCIJIAT
2895
3A
2669
DEFB
':'
2896
2670
TMN
baH,TLlST
2B99
3A
2671
DEFB
':'
2B9A
2672
TOKEN
74H,
TOUTPU
2B9D
3A
2673
DEFB
':'
2B9E
2674
TOKEN
73H.
TINPUT
.
2BA1
3A
2675
DEFB
I:'
2BA2
2676
TOKEN
6AH,
TLOAD
2BA5
3A
2677
DEFB
':
I
2BA6
2678
TOKEN
7OH,
TRETUR
2BA9
2679
lTEI1
'STOP',STOP
2BAF
2680
DEFF
DEFLT
2881 2681
TAB3:
TOKEN
76H,RND
2BB4
2682
ITEI'!
'KN',
GETPOT
28BS
2683
ITEM
'TR',
GETTRG
2BBC
2684
ITEI'!
'JX',GETJX
2BCO
2685
ITEM
I
JY'
,
GET
JY
2BC4
2686
ITEM
'!(p',
GEM
2BCS
2687
ITaI
'PX
I,
PIXFUN
2BCC
2688
ITEM
'It",
IOFUN
2BCF
2689
lTEI'!
,.
ASS'
,
ASS
2BD4
2690
lTEl'!
"'SZ
I,
SIZE
2BD8
2691
DEFF
HOTF
2BDA
2692
TAB6:
lTEI'!
'):',
XPR1
2BDE
2693
ITEM
'I',
XPR2
- -
---.--~--~----~.--'----~-"'--
------.---.-.~.--':.----~-.-
~
-
II'IODCOI'1P
Z-80
CROSS
ASSEJ1BL.ER1
HIJIE
VIDEO
GAtE
SYSTEM
PAGE
37
ADDR
OUCT
sm
LABEL
OPeD
OPERAND
C\J9IENT
2BEI
2694
ITEI1
')',XPR3
2BE4
2695
ITEM
':',
XPRS
2BE7
2696
ITEM
'(=',
XPR4
2BEB
2697
ITEt1
'(',
XPRb
2BEE
2698
DEFF
XPR7
)2BF0
2699
RANEND
EQU
$
2BF0
llD44E
2700
GETLN:
LD
DE,
BUFFER
2BF3
OF
2701
Gll:
RST
RSTOCH
;
PR€Wr
OR
ECHO
2BF4
C5
2702
Gl2:
PUSH
Be
2BF5
OS
2703
PUSH
DE
2BFb
E5
2704
PUSH
~
2705
;
PLACE
UP
CURSOR
BlOCK
2BF7
OEM
2706
LD
C,OAAH
2BF9
CD8b2D
2707
CALL
CURSE
2708
;
RETURN
CHAR
FROt1
NEXT
LINE
I
2BFC
21624E
2709
GL2A:
LD
HI..,NlLOCT
2BFF
7E
2710
LD
A,UI.>
;
SENSE
FLAG
lCOO
A7
2711
AND
A
2C01
283S
2712
JR
Z,GL2C-$
lC0335
2713
DEC
(HU
2714
;
FIRST
TItE
THRU?
lC04
FE05
2715
CP
5
2COb
200c
2716
JR
NZ,G!.2B-$
;
JUr1P
IF
NOT
2717
;
GET
PREVIOUS
LINE
I
AND
BUt'IP
IT
lC08
2A644E
2718
LD
HL
(OLDLN)
lCOB
l10A00
2719
LD
DE,
10
2COE
19
2720
ADD
~,DE
2COF
CBBC
2721
RES
7,H
;
DONT
ALLOW
NEG
lCl1
22b04E
2722
Gl2J:
LD
(NLLNUn,HL
;
tIOVE
TO
WORKING
RM
CELL
2723
I
COI1PUTE
DIVISION
SUBTRACTOR
lC14
2724
Gl2B:
SVSSUK
INDEXW
lC16
OC2F
2725
DEFW
TBlDIV-2
lC182A604E
2726
LD
~,
INlLNLN)
lCIB
0b00
2727
LD
8,0
lClD
A7
2728
Gl2E:
AND
A
lCIE
ED52
2729
SOC
/-L,DE
lC20
FA26lC
2730
JP
I1,Ol2F
2C23
04
2731
INC
8
2C2418F7
2732
JR
Ol2E-$
2C26
19
2733
Gl2F:
ADD
/-L,DE
2C2722b04E
2734
LD
(NlLNLN)
,
/-L
2C2A
21634E
2735
LD
Hl.,
NlLNZS
2C2D
78
2736
LD
A,B
2C2E
A7
2737
AND
A
2C2F
2005
2738
JR
NZ,GL2G-$
2C31
7E
2m
LD
A,
(HL)
2C32
A7
2740
AND
A
2C33
28C7
2741
JR
Z,GL2A-$
;
YES
-
JIJIP
BACK
2C35
AF
2742
XOR
A
2C36
C630
2743
GL2G:
ADD
A.
'0'
;
I1AkE
ASCII
2C38
77
2744
LD
(HU,A
;
SET
NONZERO
FLAG
2C39
1803
2745
JR
GL2D-$
2746
i
NOTHIN
FANCY
2C3B
CD9A2D
2747
Gl2C:
CALL
CHKIO
;
GET
NORI1Al
CHARACTER
2C3E
£1
2748
Ol2D:
POP~
2C3F
Dl
2749
POP
DE
2C4O
Cl
2750
POPOC
----_.~~~,,'_'="_=o.._;..~_"_."'_
____
"::;:::__-=::=-"
~.-+.-,~
..
=,
•.
~="'..,,""'"
__
-
-+
...
---,
-----"
-=-
*MOOCOMP
Z-80
CROSS
ASSEMBLER*
HOME
VIDEO
GAt1E
SYSTEM
ADDR
OBJECT
STI'IT
LABEL
OPeD
OPERAND
COI'IMENT
PAGE
38
2C41
12
2C42
FEIF
2C44
202F
2C467B
2C47
FED4
2C492BA9
2C48
18
2C4C
lA
2C4D
FE68
2C4F
3007
2C51
CDS22E
2C54
3EIF
2C56
1898
2C58
OS
2C59
CDEB2E
2C5C
7E
2C5D
ES
2C5E
E67F
2CbO
CDa22E
2C63
3ElF
2C65
CDCC2C
2C68
El
2C697E
2CbA
23
2C68
07
2CbC
30EE
2C6E
3EIF
2C70
OF
2C71
D1
2C72
C'3F42B
2C75
FEOD
2C77
CAS42C
2C7A
7B
2C7B
FE3C
2C7D
2SF3
2C7F
lA
2C80
13
2C'31
C3F32B
2CS4
13
2CS5
13
2CS6
3EFF
2C88
12
2C89
IB
2C'8A
3EOD
2751
GL3:
LD
(DEl,A
2752
2753
2754
2755
2756
2757
2758
2759
27bO
2761
2762
2763
2764
TOKIN:
2765
2766
TOKER:
2767
2768
2769
2770
2771
2772
2773
2774
2775
CP
RUBOUT
JR
NZ,GL4-$
LD
A,E
CP
BUFFER.
AND.
OFFH
JR
Z,GL2-$
DEC
DE
LD
A,
WE)
CP
baH
JR
NC.TOKIN-$
CALLPNOTE
LD
A,RUBOUT
JR
GLl-$
PUSH
DE
CALL
TOKEPT
LD
A,
(HU
PUSH
HL
AND
7FH
CALL
PNOTE
LD
A.RUBOUT
CALL
VDM
POP
HL
LD
A.
(HU
INC
HL
RLCA
JR
NC,
TOKER-$
i
TOKEN
TO
RUB
OUT?
2776
2777
2778
TOKEQ:
LD
A.
RUBOUT
2779
2780
GL9:
2781
GL4:
2782
2783
2784
2785
2786
2787
RST
RSTOCH
POP
DE
JP
GL2
CP
CR
JP
Z,GL5
LD
A.E
;
ECHO
ONE
RUBOUT
CHAR
CP
BUFEND.
AND.
OFFH
JR
Z.GL9-$
LD
A,
(DE)
INC
DE
2788
JP
GLl
2789
GL5:
INC
DE
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2SOO
2801
2802
2803
2S04
2805
2S06
2807
INC
DE
LD
A,OFFH
LD
(DEl.A
DEC
DE
CRLF:
LD
A.CR
;
SUBROUTINE
TO
SIMULATE
A
CHARACTER
DISPLAY
IN
;
THE
ARCADE
FRAME
BUFFER.
THE
SII'IULATED
VDM
HAS
i
DIMENSIONS
26
CHARS
BY
11
LINES.
THE
CHARACTER
GRAPHICS
ARE
5 X 7
i
IN
A 6 X 8
FRAME.
ALTERNATE
FONT
IS
USED
TO
GET
THIS.
j
THE
64
UPPER
CASE
ASCII
CHARACTERS
ARE
DISPLAYED
BY
THIS
;
HANDLER.
THE
ASCII
CONTROL
CHARACTERS
CARRIAGE
RETURN
AND
i
RUBOUT
ARE
ALSO
PROCESSED
BY
THIS
HANDLER.
CR
CAUSES
;
THE
DISPLAY
TO
GO
TO
THE
NEXT
LINE
OF
THE
DISPLAY.
WITH
i
SCROU.
UP
IF
NECESSARY.
RUBOUT
CAUSES
THE
CURSOR
TO
MOVE
;
BAC1<WARDS
ONE
CHARACTER
POSITION.
i
CHARACTER
TO
DISPLAY
IS
IN
A.
THe
AI:~
ftf6fmR
Sf
I -
;
-IS
~."--'"
OUTCH:
PUSH
HL
fMODCOt1P
Z-80
CROSS
ASSEI1Bl.ERf
HO\'1E
VIDEO
GAI'IE
SYSTEI1
PAGE
39
ADIR
OBJECT
STf1T
LABEL
OPCD
OPERAND
COMNT
2CSD
D5
2808
PUSH
DE
2C8E
C5
2809
PUSH
Be
2CSF
F5
281()
PUSH
AF
2C9O
57
2811
LD
D,A
2C91
3AC24E
2812
LO
A,
<TAPESn
2C94
E602
2813
AND
2 i
WRITE
TO
TAPE
WANTED?
2C96282B
2814
JR
Z,VDMCAL-$
2C98
4A
2815
LD
C,O
2C99
CBOI
2816
RLC
C
2817
i
YEP
2818
i
WRITE
START
BIT
2C9B
0812
2819
TAPCHO:
IN
A.
(TAPEIO>
;
INPUT
FF
STATE
2C9D
E602
2820
AND
2 i
WAIT
FOR
IT
TO
GO
NONZERO
2C9F
28FA
2821
JR
Z,TAPCHO-$
;
tEAMING
START
BIT
WRITTEN
2CA1
O6OA
2822
LD
B,10
i B = I
OF
BITS
TO
WRITE
2823
i
WAIT
ABOOT
1.
S
I'IILLISECONDS
TO
MOVE
BEYOND CHANGE
WINDOW
2CA33ECO
2824
TAPeHl:
LD
A,
192
2CA5
3D
2825
TAPeH2:
DEC
A
2CA6
20FD
2826
JR
NI,
TAPCH2-$
2827
i
ARE
WE
DONE
WRITING?
2CAS
05
2828
DEC
B
2CA92818
2829
JR
Z,\JDtICAL-$
;
JU\'IP
IF
SO
2830
i
NO
-
SHIFT
BIT
INTO
POSITION
AND
WRITE
2831
i
(POSITION
IS
BIT
1 )
2CAB
CBOI
2832
RLC
C
2CAD
0812
2833
IN
A,
<TAPElo)
;
KEEP
READING
INPUT
2CAF
SF
2834
LD
E,A
2CBO
0812
2835
TAPCH3:
IN
A,
<TAPEIO)
;
UNTIL
IT
TOGGLES
2CB2
AS
2836
XOR
E
2CB3
E602
2837
AND
2
2CB5
2SF9
283S
JR
Z,TAPCH3-$
2CB7
7B
2839
LD
A,E
i E =
WHAT
WE
GOT
NOW
2CSS
A9
2840
XOR
C i C =
WHAT
WE
WANT
2CB9
E602
2841
AND
2 i
DID
WE
'GET
IT?'
2CBB2802
2842
JR
Z,TAPCH4-$
i
JUI'IP
IF
SO
2CBO
DB12
2843
IN
A,
<TAPElo)
i
NO
-
READ
AGAIN
TO
TOGGLE
2CBF
CBC9
2844
TAPCH4:
SET
1,C
;
SET
EACH
BIT
WRITTEN
TO
1
2CC1
18EO
2845
JR,
TAPCHl-$
i
SO
STOP
BIT
WILL
GO
OUT
2CC3
7A
2846
VD\'ICAL:
LD
A,
D.
"
2CC4
CDCC2C
2847
CALL
VDI'I
2CC7
Fl
2848
POPAF
2CC8
Cl
2849
POP
Be
2CC9
01
2850
POP
DE
2CCA
El
2851
POPHL
2CCB
C9
2852
RET
2853
i
SOME
FUNNY
GUYS
ENTER
I£RE
2CCC
FEOD
2854
VDI1:
CP
CR
2CCE
282E
2855
JR
Z,
VDI1OCR-$
2COO
FEIF
2S56
CP
RUBOUT
;
TRANSLATE
TRASH
TO
?
2CD2
280F
2857
JR
Z,VDI11-$
2CD4
3804
2858
JR
C,FILTl-$
2CD6
FE78
2859
CP
7SH
2CDS
3802
2860
JR
C,FILT2-$
2CDA
3E3F
2861
FILT1:
lD
A.
'?'
2CDC
FE68
2862
FILT2:
CP
68H
i
TOKEN
TO
PRINT?
2CDE
304F
2863
JR
NC,TOKEP-$
i
JUI'IP
IF
SO
2864
i
PLAY
NOTE
FOR
THIS
CHAR
---'
..
-·"-···~··
..
_
..
~··~
__
~.~~.",'""."C
..
·.O.~~-=
...
= =
~.-
..
-
.......
-.-
.........
,-
___
~
..
_~
.....................
_.=.=._.~.-.
__
.
_'
*f1OOCot1P
Z-80
CROSS
ASSEf1BlER*
HOI'IE
VIDEO
GAME
SYSTEM
PAGE
40
ADDR
OBJECT
SnIT
LABEL
OPCD
OPERAND
COt1I'1ENT
2CEO
CD822E
2865
CALL
PNOTE
2866
;
NON
NEW
LINE
CHAR
-
UNWRITE
OLD
CURSOR
2CE3
CD4420
2867
VDMI:
CALL
UC1JRSE
2CEb
CD9E23
28bS
CALL
LDVDMC
2CE9
FEIF
2869
CP
RUBOUT
j
WAS
THAT
RUBOUT?
2CEB
201F
2870
JR
NZ,VDM3-$
i
JUI'IP
I F
NOT
2871
;
RUBOUT
ENTERED
-
so
RUB
OUT
2CED
7D
2872
LD
A,L
i
GET
X
2CEE
A7
2873
AND
A i
IS
X =
O?
2CEF
2805 2874
JR
Z.VDI'!2-$
i
YES
-
JUI'IP
2CF1
DbOb
2875
SUB
6 i
NO
-
BACKUP
X
2CF3
bF
2876
LD
L.A
2CF4
1831
2877
JR
VDMDNl-$
i
AND
JOIN
STORE
BACK
2CF62E96
2878
VDl't2:
LD
L,l50
2CF87C
2879
LD
A,H
2CF9
ObOS
2SSO
SUB
8
2CFB
67
2881
LD
H/A
2CFC
1829
2882
JR
VDMDNl-$
2883
i
NEW
LINE
CHAR
-
DID
WE
JUST
WRAP
AROUND
2CFE
3A.'544E
2884
VDI'IOCR:
LD
A,iVDf1NI..FI
;
CHECK
OLD
GLORY
2001
A7
28S5
AND
A
2002 2026
28S6
JR
NZ,VDMDON-$
i
YES
-
SKIP
DIDDLING
2004
CD4420
2887
CALL
UCURSE
i
NO
-
UNWRITE
CURSOR
2007
CD4S2D
2SSB
CALL
NEWLIN
i
GO
TO
NEXT
LINE
200A
ISlE
2889
JR
VDMDON-$
;
AND
QUIT
2890
i
NORt1AL
CHARACTER
ENTERED
-
DISPLAY
IT
2DOC
54
2891
VDM3:
LD
D,H
i
COORDINATES
TO
DE
200D
5D
2892
LD
E,L
2DOE
F680
289"3
OR
SOH
;
AL
T
FONT
THE
CHAR
2010
0E18
2894
LD
C,Ol1ooo8
i
OR
WRITE
THE
CHAR
2D12
DD21bb4E
2895
LD
IX,ALTFON
i
USING
ALTERNATE
CHAR
FONT
2D16
2896
SYSTEM
CHRDIS
i
00
IT'
lOtS
70
2897
LD
A,L
i
ADVANCE
X
POINTER
2D19
CbOb
289S
ADD
A,6
2018
bF
2B99
LD
L,A
2D1C
FE9C
2900
CP
156
i
END
OF
LINE?
20IE
2007
2901
JR
NZ,VDMDNl-$
i
NO
-
JUI'IP
2020
CD482D
2902
CALL
NEWLIN
;
YES
-
DO
NEW
LINE
2023
3[01
2903
LD
Ad j
AND
SET
NEW
LINE
FORCED
FLAG
2025
1804
2904
JR
VDt1DN2-$
2027
CDBS23
2905
VDMDNl:
CALL
STVDMC
2D2A
AF
2906
VDt1DON:
XOR
A i
CLEAR
NEW
LINE
FORCED
FLAG
2D28
32544E
2907
VDMDN2:
LD
(VDMNLF),A
2D2E
C9
2908
RET
2909
i
ROUTINE
TO
DISPLAY
A
TOKEN
IN
FULL
FORM
2D2F
CDEB2E
2910
TOKEP:
CALL
TOKEPT
2D32
7E
2911
TOKEP1:
LD
A.
{HD
2033
E67F
2912
AND
7FH
2D35
E5
2913
PUSH
HL
2D3b
CDCC2C
2914
CALLVDt1
2D39
El
2915
POP
HL
2D3A
7E
2916
LD
A,
(HLI
203823
2911
INC
HL
2D3C
07
2918
RLCA
2D3D3OF3
2919
JR
NC.TOKEPl-$
2D3F3E20
2920
TOKEP2:
LD
A,' I i
PUT
SPACE
AFTER
TOKEN
2041
C3Ct2C
2921
JP
VDM
i
AND
RETURN
*MODCOI'IP
Z-SO
CROSS
ASSEJ1BI..ER*
HOt£
VIDEO
GAf£
SVSTEtf
PAGE-
41
ADDR
OBJECT
ST"T
LABEL
OPCD
OPERAND
cat1ENT
2922
i
SUBROUTINE
TO
ImWRITE
THE
CURSOR
2D44
0E00
2923
UCURSE:LD
C,O
2D46
183E
2924
JR
CURSE-$
2925
i
SUBROUTINE
TO
DISPLAY
NEW
LINE
2D48
CD9E23
2926
NEWlIN:
CALL
lIlVDtIC
2927
i
IS
SCROLl
lP
NEEDED?
2D4B
1£00,
2928
LD
L,O
2D4D
7C
2929
LD
A,H
2D4E
FE50
2930
CP
SO
2D5O
2020
2931
JR
NZ.NEWL1-$
i
JUI1P
IF
NOT
t£EDED
2932
i
SCROLl
UP
IS
NEEDED
2052
CDBS23
2933
CALL
SlVDt1C
2D55
21C04D
2934
LD
Hl,4DCOH
,
2D58
7E
2935
SCRL9:
LD
A,
(HI..)
/"
2059
E655
293b
AND
010101018
2058
n
2937
LD
(Hl),A
2D5C
23
2938
INC'
HL
2DSD
7D
2939
LD
A,L
2D5E
FE20
2940
CP
20H
2D6O
2OF6
2941
JR
NZ,SCRL9-$
2062
0b04
2942
LD
8,4
2D64
C5
2943
SCRLP:
PUSH
BC
2065210040
2944
LD
HL,NORtO
2068
115040
2945
LD
DE,
NORI'IEM+SO
206B
010E98
2946
LD
BC.098OEH
2DbE
lA
2947
SCRUP:
LD
A,
(DE)
2D6F
AE
2948
XOR
(HI..)
2070EbM
2949
AND
101010108
2D72
AE
2950
XOR
(HL)
2D73
n
2951
LD
(HL),
A
2074
23
2952
INC
II.
2075
13
2953
INC
DE
",";70,'
2076
lOF6
2954
DJNZ
SCRUP-$
20780D
2955
DEC
C
207920F3
2956
JR
NZ.scRuP-$
2078
Cl
2957
POPBC
2D7e
l0E6
2958
DJNZ
SCRLP-$
207E
C9
2959
RET
2960
207F
Cb08
2961
NEWl1:
ADD
A.S
2081
67
2962
LD
H,A
2D82
CDBS23
2963
CALL
STVDtIC
2D85
C9
2964
RET
2965
i
SUBROUTINE
TO
PAINT
CURSOR
2966
i C =
DATA
TO
PAINT
00
OR
M
2086
F5
2967
CURSE:
PUSH
AF
2087
CD9E23
2968
CALL
LDVDt1C
2D8A
EB
2969
PCURSl:
EX
DE,Hl
2D8B
AF
2970
XOR
A
2D8C
2971
SVSTEt1
RELABl
2D8E
D30C
2972
OUT
H1AGIC).
A
2D9O
EB
2973
EX
DE,Hl
2091
79
2974
LD
A,C
2092010608
2975
LD
BC,0806H
2D95
CD9C22
2976
CALL
BOXPUT
2D98
Fl
29n
POPAF
2D99
C9
2978
RET
*1'tOIlCOt'IP
Z-SO
CROSS
ASSEI1BLER*
HOI£
VIDEO
GAI1E
SYSTEI1
PAGE
42
ADDR
OBJECT
STI1T
LABEL
OPCD
OPERAND
COltIENT
,-~,
2979
i
NEW
KE'iBOARD
HANDLER
gA!<lt;;
2980
i
WITH
SHIFT
KEY
ROlLOVER
;
TAPE
INPUT
WANTED?~
C
3/
2D9A
3AC24E
2981
CHKIO:
LD
A.
<TAPEsn
2D9D
3D
29S2
DEC
A
2D9E
2019
29S3
JR
NZ.
CHKIIlH ; Nl -
SKIP
IT
TID
2984
i
YES
-
CHECK
FOR
ABORT
KEYSTROKE
20M
CD582E
29S5
CALL
KEYSCN
2DA3
C2A324
2986
JP
NZ.INITO
29S7
i
GET
CWlRACTER
FROtI
THE
BUFFER
2DAb
2A204E
2988
LD
HI..
(CONPRQ)
2DA97C
2989
LD
A,H
20M
BD
2990
CP
L i
ARE
POINTERS
EQUIt.?
lDAB
28ED
2991
JR
Z,CHKIO-$
;
YEP
-
LOOP
WAITING
lDAD
bF
2992
LD
L.A
;
MAKE
OFFICIAL
POINTER
2DAE
2b4E
2993
LD
H.
TAPBUF.
SKi
S
lOBO
4E
2994
LD
C,Ut.)
2DBI
CD2C21
2995
CALL
BUl'IPTR
2DB4
32214E
2996
LD
(CONPTR)
I A ;
lfDATE
ttY
POINTER
208779
2997
LD
A,C
;
PASS
BACK
THE
CHARACTER
2DB8
C9
2998
RET
2DB9
CD582E
2999
CHKlOO:
CALL
KEYSCN
i
!'lAKE
smE
PREVIOUS
KEY
RELEASED
2DBC
20FB
3000
JR
NZ,OI<IOQ-$
3001
i
AWAIT
DEBOUNCE
TIB
COUNTDOWN
lOBE
21554E
3002
CHKlOO:
LD
HL,KEYTt1R
2DCl
3606 3003
LD
(HL).6
iSETIT
2DC37E
3004
LOOPER:
LD
A,
(HU
2DC4
A7
3005
ANnA
2DC5
20FC
3006
JR
NZ.LOOPER-$
3007
i
SAVE
BACKGROUND
COLOR
2DC73AA24E
3008
LD
A,
(DEVCLO)
2DCA
F5
3009
PUSH
AF
3010
i
ASSUI£
FIRST
LEVEL
KEYCODE
2DCB
21642F
3011
LD
HL.FIRSTL
2DCE
E5
3012
GETKl:
PUSH
HL
;
SAVE
TABLE
PTR
3013
i
SCAN
ONLY
FOR
SHIFT
KEYS
2DCF
21B72F
3014
LD
HL.KTBL4
2DOl
llEBFF
3015
LD
DE.-21
i H
SIZE
OF
LOOKUP
TABLE
2005
011404
3016
LD
BC,0414H
2DD8
ED78
3017
GETK2:
IN
A.
tC)
i
INPUT
FROtt
PORT
20M
E620
3018
AND
20H
;
SHIFT
KEY
DOWN?
2DDC
2007
3019
JR
NZ.GETK3-$
i
.DIP
IF
YEP
2DDE
19
3020
ADD
HL.DE
;
ELSE
TO
NEXT
TABlE
2DDF
OC
3021
INC
C ;
AND
PORT
2DEO
IOF6
3022
DJNZ
GETK2-$
3023
;
NO
SHIFT
KEY
IS
IlI»4
-
USE
WHATEVER
WE
HAD
BEFORE
2DE2
El
3024
POP
HL
2DE3
lSOF
3025
JR
GETKS-$
3026
; A
SHIFT
KEY
IS
DOWN
-
SAI£
OLD
STORY?
2DE5
D1
3027
GETK3:
POP
DE
;
DISCARD
OLD
BELIEFS
2llE6
3AA24E
3028
LD
A.(DEVCLO)
i
IS
CURRENT
SCREEN
COLOR
2DE9
BE
3029
CP
(HL)
;
THE
SAME
AS
WHAT
WE
WOllD
SET?
2DEA
2807
3030
JR
1.GETK4-$
;
YEP
-
DON'T
BOTHER
WITH
FEEDBACK
2DEC
7E
3031
LD
A,
(HL)
i
ELSE
SET
to
COLOR
2DED
32A24E
3032
LD
(DEVCLO),A
I
2DFO
CD272E
3033
CALL
WCLICK
i
AND
GO
CLICK
2DF3
23
3034
GETK4:
INC
HL
;
SKIP
COLOR
BYTE
3035
i
r«lW
SCAN
FOR
ANY
'NORttAL'
KEY
DEPRESSION
ftIODCOl'IP
z-so
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
43
ADOO
OBJECT
STHT
LABEL
OPeD
OPERAND
COMNT
2DF4
CD582E
3036
GETK5:
CALL
KEYSCN
2DF7
28D5
3037
JR
Z,GETK1-$
;
JUMP
IF
NO
KEY
DOWN
3038
;
WE
GOT
ONE
-
CONVERT
TO
ASCII
2DF9
3D
3039
DEC
A ;
BY
TABLE
LOOKUP
2DFA
4F
3040
LD
C,A
2DFB
0b00
3041
LD
B,O
2DFD
09
3042
ADD
HL,Be
2DFE
F1
3043
POP
AF
j
RESTORE
COLOR
2DFF
32A24E
3044
LD
(DEVCLO),A
2E02
7E
3045
LD
A,
(HL)
;
GET
CODE
2E03
A7
3046
AND
A ; A
HALT
PERCHANCE?
2E04284C
3047
JR
Z,INIJMP-$
;
YEP
-
RESET
2EOb
FEOt
3048
CP
1 ;
AN
ERROR?
2EOS
CA9A2D
3049
JP
Z,CHKIO
;
YEP
-
GO
DOlT
AGAIN
3050
j
GOOD
KEY
...
2EOB
F5
3051
CHKI02:
PUSH
AF
;
NEED
WE
GO
'CLICK'?
2EOC
FEb7
3052
CP
NLLN
;
REJECT
TOKENS
2EOE
300A
3053
JR
NC,NOCLJ(-$
2EI0
3054
SYSSUK
INDEXB
2E12
002F
305.'5
DEFW
NOTES-cR
2E14
3C
3056
INC
A
2E152oo3
3057
..IR
NZ,NOCLK-$
2EI7
CD272E
3058
CALL
WCLICK
2EIA
Fl
3059
NOCLK:
POP
AF
2EIB
FE67
3060
CP
NLLN
2ElD
CO
3Ob1
RET
NZ
2EIE
210500
3062
LD
HL,5
2E21
22624E
3Ob3
LD
(NLLNCT>,HL
j
SET
FLAG
AND
ZERO
SUPRESS
2E24
3EOD
3064
LD
A,CR
;
PASS
BACK
CR
AS
FIRST
CHAR
2E26
C9
3065
RET
2E273A574E
3066
WCLICK:
LD
A,
(NEWTI"IRJ
2E2A
A7
3067
AND
A
2E2B
20FA
3068
JR
NZ,WCLICK-$
2E2D
3EFD
3069
LD
A,
GO
2E2F
32594E
3070
LD
<tIUZTON)
I A
2E32
3AA64E
3071
LD
A,
(DEVTEtB
i
DON'T
CLICK
IF
NT=O
2E35
A7
3072
AND
A
2E36
CS
3073
RET
Z
2E373E01
3074
LD
A,l
2E39
32574E
3075
LD
(NEWTI"IR1,A
2E3C
C9
3076
RET
30n
3078
;
SUBROUTINE
TO
CHECK
FOR
HALT
KEY
WHILE
PGI1
RUNNING
2E3D
C5
3079
WHATSU:
PUSH
Be
2E3E
D5
3OSO
PUSH
DE
2E3F
CD582E
3081
CALL
KEVSCN
i
GET
KEV
CODE
2E42
0602
3OS2
SUB
2 ;
FREEZE?
2E442S05
3OS3
JR
Z,FRZKEY-$
2E4b
3D
3084
DEC
A
2E472S09
30SS
JR.
Z,
INIJMP-$
2E49
lSOA
308b
JR
FRZGBK-$
;
RSE
GO
BACK
TO
CALLER
2E4B
CD5S2E
3087
FRZKEV:
CALL
KEVSCN
i
SCAN
FOR
NONZERO
KEY
TO
REL
2E4E
2SFB
3088
JR
Z,FRZKEY-$
2E50
FE03
3OS9
CP
3 i
HALT
NAILED?
2E52
CAAb24
3090
INIJMP:
JP
Z,INIT
2ESS
D1
3091
FRZGBK:
POP
DE
2E56
C1
3092
POP
Be
---------"-
._._"
tI'IODCOHP
Z-80
CROSS
ASSEMBLERt
HOME
VIDEO
GAME
SYSIDI
PAGE
44
ADDR
OBJECT
STI'IT
LABEL
opeD
OPERAND
COMMENT
1£57
C9
3093
RET
3094
i
SUBROUTINE
TO
SCAN
TINY
BASIC
KEYBOARD
2ESS
011404
3095
KEYSCN:
LD
BC,0414H
i B =
CNT,
C =
PORT
#
2E5B
116D4E
3096
LD
DE,KEYTRK
i
DE
=
KEYBOARD
MEMORY
1£5E
AF
3097
XOR
A
2E5F
3098
SYSTEM
RANGED
2E61
ED78
3099
KYSCNl:
IN
A,
(C)
i
LOOK
AT
COLUMN
1£b3
E61F
3100
AND
IFH
i
ISOLATE
THE
RELEVANT
2E65
2006
3101
JR
NZ,KYSCN2-$
i
.Jl/t1P
IF
BITS
HIGH
1£67
OC
3102
INC
C i
BUMP
PORT
#
2E68
10F7
3103
DJNZ
KYSCNl-$
1£bA
AF
3104
XOR
A i
SET
ZERO
STATUS
1£6B
12
3105
LD
(DE),
A ;
NOTHIN
-
SAY
ZIP
1£6C
C9
3106
RET
3107
;
DEPRESSION
FOUND
-
JUMP
UP
AND
DOWN
1£bO
05
3108
KYSCN2:
DEC
B
1£bE
0E00
3109
LD
C,O
j
COME
UP
WITH
BIT
#
1£70
OF
3110
KYSCN4:
RRCA
j
SHIFT
BIT
OVER
2E71
3803
3111
JR
C,KYSCN3-$
j
JUI'/P
IF
THE
ONE
2E73
OC
3112
INC
C i
ELSE
COUNT
UP
1£74
1SFA
3113
JR
k'YSCN4-$
i
AND
TRY
AGAIN
3114
;
FOUND
BIT
-
ASSEMBLE
KEYCODE
2E7679
3115
KYSCN3:
LD
A,e
i
BIT
,
TO
A
2E77
07
3116
RLCA
i t 4
1£78
07
3117
RLCA
1£79
eo
3118
OR
B i
COMBINE
WITH
COL
#
2E7A
3C
3119
INC
A
2E7B
47
3120
LD
B,A
2E7C
lA
3121
LD
A,
(DE)
2E7D
AS
3122
XOR
B
1£7E
ce
3123
RET
Z i
QUIT
IF
THE
SAf£
2E7F
78
3124
LD
A,B
j
ELSE
RESTORE
1£00
12
3125
LD
(DE),
A ;
UPDATE
TRACKER
2E81
C9
3126
RET
3127
;
SUBROUTINE
TO
PLAY
A
NOTE
2E82
E5
3128
PNOTE:
PUSH
HL
1£83
os
3129
PUSH
DE
2E84
F5
3130
PUSH
AF
1£85
67
3131
LD
H,A
3132
j
WAIT
FOR
PREVIOUS
PARAMETERS
TO
BE
EATEN
2E86
3A574E
3133
PRWAIT:
LD
A,
(NEWTf1R)
2E89
A7
3134
AND
A
1£BA
20FA
3135
JR
NZ,PRWAIT-$
j
LOOP
1£SC
7C
3136
LD
A,H
1£8D
FE63
3137
CP
b3H
i
DIVIDE?
1£SF
2S1£
3138
JR
Z,PNOTDV-$
1£91
FE62
3139
CP
62H
;
I'IlL
TIPL
V?
1£93
2831
3140
JR
Z,PNOTML-$
1£95
FE2B
3141
CP
'+'
1£97
2831
3142
JR
Z,PNOTPL-$
1£99
FE2D
3143
CP
~-.!
1£9B
2830
3144
JR
Z
..
PNOTMN-$
2E9D
FE30
3145
CP
'0'
1£9F
2830
31%
JR
Z.PNOTZ-$
1£Al
21002F
3147
LD
HL,NOTES-cR
1£A4
3148
HOCKIN:
SYSTEM
INDEXB
1£Al>
3C
3149
INC
A ;
CLICK?
f\1ODCOHP
1-80
CROSS
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEtI
PAGE
45
ADDR
OBJECT
STMT
LABEL
OPeD
OPERAND
COt1t1ENT
2EA7
280E
3150
JR
Z.PNOTCL-$
2EA9
3C
3151
INC
A i
AINSWORTH
NUt1BA?
2EAA
2831
3152
JR
Z.PNOTNO-$
2EAC
3D
3153
DEC
A
2EAD
3D
3154
DEC
A
2EAE
32S94E
3155
LD
(l1UZTON)
A
2EBl
3AAb4E
3150
LD
A,
(DEVTEtI)
2EB432574E
3157
LD
(NEWTI'IR)
A
2EB7
AF
3158
PNOTCL:
XOR
A
2ESS
325A4E
3159
PSHARP:
LD
(SHARPF).A
2EBB
Fl
3160
PNOTC1:
POP
AF
2EBC
Dl
3161
POP
DE
2EBD
E1
3162
POP
HL
2EBE
C9
31b3
RET
2EBF
3ESF
3164
PNOTDV:
LD
A,OAI
2EC1
32584E
3165
PNOTDl:
LD
(MUZMQ).A
2EC4
lSF5
3166
.JR
PNOTC1-$
2EU
3E23
3167
PNOTML:
LD
A.0A3
2EeS
1SF7
3168
JR
PNOTDl-$
2ECA
3E01
3169
PNOTPL:
LD
A,l
2ECC
11
3170
DEFB
llH ;
OPCODE
TO
MUNCH
NEXT
TWO
BYTES
INTO
DE
2ECD
3E02
3171
PNOTt1N:
LD
A,2
2ECF
lSE7
3172
JR
PSHARP-$
2ED1
21504E
3173
PNOTZ:
LD
HL.MUZTMR
2ED4
3AAb4E
3174
LD
A.
(DEVTEtll
2ED7
F3
3175
Dl
2EDS
86
3176
ADD
A.(HLl
2ED9
77
3177
LD
(HL),A
2EDA
FB
3178
EI
2EDB
HIDE
3179
JR
PNOTC1-$
3180
;
PLAY
AINSWORTH
NOTE
2EDD
3A5A4E
3181
PNOTNO:
LD
A,
(SHARPF>
i
RESTORE
CHARACTER
2EEO
3182
SYSSIJK
INDEXW
2EE2
F92E
3183
DEFW
DICKY
2EE4
EB
3184
EX
DE.HL
2EES
Ft
31B5
pop
AF
2EE6
F5
3186
PUSH
AF
2EE7
Db31
31B7
SUB
~1'
2EE9
1889
3188
JR
HOOKIN-$
3189
i
SUBROUTINE
TO
POINT
AT
A
TOKEN
2EES
216420
3190
TOKEPT:
LD
HL.
TOKTXT
i
POINT
AT
TEXT
LIST
2EEE
Db68
3191
SUB
6SH
2EFO
CS
3192
JOKEPl:
RET
Z i
QUIT
IF
POINTING
AT
EM
2EFt
CB7E
3193
JOKEP2:
BIT
7,{HLl
i
MOVE
PAST
NEXT
WORD
2EF323
3194
INC
HL
2EF42SFB
3195
JR
Z.
JOII.'EP2-$
2EF6
3D
3196
DEC
A
2EF7
1SF7
3197
JR
.JOKEP1-$
i
LOOP
BACK
AND
CHECK
3198
j
t1IJSIC
TABLES
2EF9
Ob2F
3199
DICKY:
DEFW
MUZNOR
2EFB
1e2F
3200
DEFW
MUZMAX
2EFD
FF2E
3201
DEFW
t1IJZMIN
2EFF
3202
MlJZMIN:
2EFF
64
3203
DEFB
B1
2FOO
59
3204
DEFB
C.S2
2FOl
4F
3205
DEFB
DS2
2F024A
32(16
DEFB
E2
*11ODC0tIP
Z-OO
CROSS
ASSEIB.ER*
HOME
VIDEO
GAtE
SYSTEtt
PAGE
40
ADDR
OBJECT
STItT
LABEL
OPCD
(FERAND
COMNT
2F0342
3207
DEFB
FS2
2F04
3B
3208
DEFB
GS2
2F0534
3209
DEFB
AS2
2F06
3210
MUZNOR:
2F06
5E
3211
DEFB
C2
2F0754
3212
DEFB
D2
2F08
4A
3213
DEFB
E2
2F0940
3214
DEFB
F2
2FOA
3E
3215
DEFB
62
2FOB
37
3216
DEFB
A2
2FOC
31
3217
DEFB
B2
3218
;
TONE
GENERATION
TABLE
-
ORDERED
BY
ASCII
CHARACTER
)OOFF
3219
CLICK
EQU
OFFH
>OOFE
3220
NUt1BA
EQU
OFEH
2FOD
FF
3221
NOTES:
DEFB
CLICK
iCR
3222
i
IRRELEVANT
STtFF
TO
EAT
TABLE
SPACE
2FOE
0100
3223
TBLDIV:
DEFW
1
2FI0
OAOO
3224
DEFW
10
2F126400
3225
DEFW
100
2F14
E003
3226
DEFW
1000
:'
"
2F16
1027
3227
DEFW
10000
2F18
3228
I'IUZI'1AX:
2F18
59
3229
DEFB
CS2
2F194F
3230
DEFB
052
2FIA
40
3231
DEFB
F2
2FIB
42
3232
DEFB
FS2
2F1C
3B
3233
DEFB
002
2F1D
34
3234
DEFB
AS2
2F1E
2E
3235
DEFB
C3
3236
;
AND
THE
TABLE
CONTINUES
2F1F
FF
3237
DEFB
CLICK
2F20
00
3238
DEFB
0
2F21
El
3239
DEFB
AO
2F22
04
3240
DEFB
ASO
2F23
C8
3241
DEFB
BO
2F24
BD
3242
DEFB
Cl
2F25
B2
3243
DEFB
CS1
2F2b
AS
3244
DEFB
01
2F27
9F
3245
DEFB
051
2F28
96
3240
DEFB
El
2F29
SO
3247
DEFB
F1
2F2A
85
3248
DEFB
FSI
2F2B
FF
3249
DEFB
CLICK
2F2C
77
3250
DEFB
001
2F2D
FF
3251
DEFB
CLICK
2F2E
6A
3252
DEFB
ASI
2F2F
64
3253
DEFB
B1
2F30
FF
3254
DEFB
CLICK
2F31
FE
3255
DEFB
tUIBA
2F32
FE
3256
OEFB
NltIBA
2F33
FE
3257
DEFB
NIJIBA
2F34
FE
3258
DEFB
NtI1BA
2F35
FE
3259
DEFB
NltIBA
2F36
FE
3260
DEFB
NI.IttBA
2F37
FE
3261
DEFB
NUttBA
2F38
2E
3262
DEFB
C3
2F39
2C
3263
DEFB
CS3
ft1OOCOI'IP
1-80
CROSS
ASSEIiBLER*
HOt1E
VIDEO
GAI£
SYSTEM
PAGE
47
ADDR
OBJECT
STm
LABEL
OPeD
OPERAND
cort1ENT
2F3A
29
3264
DEFB
D3
2F3B
27
3265
DEFB
053
2F3C
25
3266
DEFB
E3
2F3D
22
3267
DEFB
F3
2F3E
20
3268
DEFB
FS3
2F3F
IF
3269
DEFB
G3
2F40
10
3270
DEFB
6S3
2F41
IB
3271
DEFB
A3
2F42
1A
3272
DEFB
AS3
2F43
18
3273
DEFB
B3
2F44
17
3274
DEFB
C4
2F45
15
3275
DEFB
CS4
2F46
14
3276
DEFB
D4
2F47
13
32n
DEFB
DS4
2F48
12
3278
DEFB
E4
2F49
11
3279
DEFB
F4
2F4A
10
3280
DEFB
FS4
2F4B
OF
3281
DEFB
G4
2F4C
OE
3282
DEFB
GS4
2F4D
OD
3283
DEFB
A4
2F4E
OB
3284
DEFB
C5
2F4F
OA
3285
DEFB
CS5
2F50
09
3286
DEFB
055
2F51
08
3287
DEFB
F5
2F52
07
3288
DEFB
65
2F53
06
326'9
DEFB
A5
2F54
05
3290
DEFB
C6
2F55
04
3291
DEFB
DS6
2F56
03
3292
DEFB
Gb
2F57
02
3293
DEFB
C7
2F58
01
3294
DEFB
67
2F59
64
3295
DEFB
Bl
2F5A
SE
3296
DEFB
C2
2FSB
59
3297
DEFB
CS2
2FSC
54
3298
DEFB
D2
2F5D
4F
3299
DEFB
052
2FSE
4A
3300
DEFB
E2
2F5F
46
3301
DEFB
F2
2F60
42
3302
DEFB
FS2
2F61
3E
3303
DEFB
G2
2F62
FF
3304
DEFB
CLICK
2F63
FF
3.305
DEFB
CLICK
3306
i
TABLE
OF
FIRST
LEVEL
"'ECODES
2F64
3307
FIRSTL:
2F64
OD
3308
DEFB
CR
2F65
01
3309
DEFB
1
2Fbb
00
3310
DEFB
0
2F6763
3311
DEFB
63H
2FbS
37
3312
DEFB
'7'
2F69
38
3313
DEFB
'8!
2FbA
39
3314
DEFB
'9'
2F6B
62
3315
DEFB
62H
2FbC
34
3316
DEFB
'4"
2F6D
35
3317
DEFB
15'
2FbE
36
3318
DEFB
'6
1
2F6F
2D
3319
DEFB
'-'
2F70
31
3320
DEFB
'11
- t
fI1OOCOI'IP
Z-SO
CROSS
ASSEt1BLER*
HOt1E
VIDEO
GAME
SVSTEM
PAGE
48
ADDR
OB..ECT
sm
LABEL
OPeD
OPERAND
COIt1ENT
2F71
32
3321
DEFB
'2'
2F72
33
3322
DEFB
'3'
2F732B
3323
DEFB
'+'
2F74
20
3324
DEFB
' ,
2F7S
30
3325
DEFB
'0'
2F76
1F
3326
DEFB
RUBOUT
2F7730
3327
DEFB
':'
3328
i
FIRST
SHIFT
KEY
2F78
3329
KTBLl:
2F78
A7
3330
DEFB
0A7H
i
FIRST
SHIFT
KEY
COLOR
2F79
00
3331
DEFB
CR
2F7A
01
3332
DEFB
1
2F7B
00
3333
DEFBO
2F7C
01
3334
DEFB
1
2F7D
41
3335
DEFB
'A'
2F7E
44
3336
DEFB
'0'
2F7F
47
3337
DEFB
'G'
2FSO
4A
3338
DEFB
'J'
2F81
40
3339
DEFB
'",
2F8250
3340
DEFB
'P'
2F83
53
3341
DEFB
'5'
2F84
56
3342
DEFB
'V'
2FS5
59
3343
DEFB
'V'
2F86
5F
3344
DEFB
5FH
2F87
5E
3345
DEFB
5EH
""",'
{ ,
2FSS
26
3346
DEFB
'Ie'
2F89
24
3347
DEFB
'$'
2FSA
3C
3348
DEFB
'('
2FBB
28
:3349
DEFB
'('
2FBC
23
3350
DEFB
'#"
3351
i
SECOND
SHIFT
KEY
2F8D
3352
KTBL2:
2F8D
5F
33!"J3
DEFB
05FH
i
SECOND
SHIFT
KEY
COLOR
2FSE
on
3354
DEFB
CR
2FSF
2F
3355
DEFB
2FH
2F90
00
335b
DEFB
0
2F91
5B
3357
DEFB
5BH
2F92
42
335S
DEFB
'B'
2F9345
3359
DEFB
'E'
2F9448
3360
DEFB
'W
2F95
4B
3361
DEFB
'K'
2F96
4E
3362
DEFB
'N'
'1F97
51
33b3
DEFB
'Q'
2F9854
3364
DEFB
'T'
2F99
57
3365
DEFB
'I<V
2F9A
SA
;W..,b
DEFB
'I'
2F9B
27
3367
DEFB
27H
2F9C
2E
3368
DEFB
'. '
2F9D
40
3369
DEFB
'@'
2F9E
2C
3370
DEFB
','
2F9F
22
3371
DEFB
22H
2FAO
38
3372
DEFB
,;,.
2FAl
25
3373
DEF8
'I.'
3374
i
TABLE
THE
THIRD
2FA2
3375
KTBL3:
2FA2
OF
3376
DEFB
OFH
i
THIRD
SHIFT
KEY
COLOR
2FA3oo
3377
DEFB
CR
*MODCOMP
Z-~j
CROfS
ASSEMBLER*
HOME
VIDEO
~
SYSTEM
ADDR
OBJECT
STMT
LAfi£L
OPCD
OPERAND
COMMENT
PAGE
49
2FM
5C
~:378
DEFB
5CH
2FA5
O(l
3379
DEFB
0
2FAb
50
3"380
DEFB
SOH
2FA743
3331
DEFE
"C'
2FAB
40S
3332
DEFB
'F'
2FA9
49
3383
DEFB
i1'
2FAA
4C
3334
DEFB
'V
2FAB
4F
3385
DEFB
'0"
2FAC
52
:33P..6
DEFE
'R'
2FAD
55
3387
DEFB
'U'
2FAE
58
3~~98
fiEFB
'X"
2FAF
21
3389
DEFB
"!'
2FBO
61
3390
DEFB
61H
2FBl
60
3391
DEFB
60H
2FB22A
:3392
DEFB
'*'
2FB3
3F
Xfl~'1
....
:J.
....
r
DEFB
.,?,
2FB4
:3E
:3394
DEFB'),"
2FP~
2'1
:3:395
DEFB
')'
2FB6
3A
'",--u-r!
';:~Jt)
DEFB
':'
3397
TOKEN
KEY
2FB7
:339B
KTBl4:
2FB7
77
3399
DEFB
77H
i
WORDS
KEV
COLOR
2FES
67
3400
OEFB
NLLN
2FB9
01
:3401
DEFB
1
2FBA
6A
3402
DEFB
bAH
2FBB
68
340:3
DEFB
68H
2FBC
72
3404
DEFB
72H
2FBD
77
3405
DEFB
77H
2FBE
75
:3406
DEFB
75H
2FBF
bB
3407
DEFB
bBH
2FCO
6F
3408
DEFB
bFH
2FCl
70
~:409
DEFB
10H
2FC2
7f:..
3410
DEFB76H
2FC3
6[1
3411
DEFB
bOO
2FC4
69
3412
DEFB
69H
2Fes
be
34i~:
DEFB
bCH
2FCoS
71
2414
DEFB
71H
2FC7
6E
3415
OEFB
bEH
2FC8
01
3416
DEFB
1
2FC9
73
3417
DEFB
7311
2FCA
01
341B
DEFB
1
2FCB
74
3419
DEFB
74H
2420
SUBROUTINE
TO
LD
~
WE)
FROM
SCREEN
TEXT
MEMORY
IF
NECESSARV
2FCC
08
3421
LDE:
EX
AF,AF'
2FCD
CB7A
3422
BIT
7,D
2FCF
2810
3423
.JR
Z,LDE1-$
2FD1
D5
3424
PUSH
DE
2FD2
EB
3425
EX
DE.HL
2FD3
29
3426
ADD
HL,HL
2FD4
7E
~!427
LD
A,
(HL)
2FD5
07
342B
RLCA
lFD6
23
3429
INC
HL
2FD7
AE
3430
XOR
(HL)
2FDB
EbM
3431
AND
10101010B
2FDA
AE
3432
XOR
mu
2FDB
67
34
... ·.,
oJ.i.J
LD
H,A
2FOC
os
3434
EX
AF,AF'
....,,~
*MODCOMP
I-BO
CqO~S
ASSEMBLER*
HOME
VIDEO
GAME
SYSTEM
PAGE
50
ADM
OB,JECT
STMT
LABEL
OPCD
OPERAND
COMNT
2FDD
7C
34:35
LV
A,H
2FDE
EB
:3436
EX
DE.HL
2FDF
D1
34:37
POP
DE
2FEO
C9
3438
RET
2FEl
08
:3439
LDE1:
EX
AF,
AF-'
2FE2
iA
3440
LD
A,
(DE)
2FE3
C9
3441
RET
3442
SUBROUTINE
TO
STORE
LD
{HLl,A
2FE4
E5
3443
STHL:
PUSH
HL
2FE5
F5
3444
PUSH
AF
2FE6
CB7C
3445
BIT
7,H
2FES
280E
3446
JR
Z.STHL1-$
2FEA
29
:3447
ADD
HL,HL
2FEB
OF
344B
RRCA
2FEe
AE
3449
XClR
iHU
2FED
EW5
3450
AND
01010101B
2FEF
AE
3451
XOR
(HL)
2FFO
77
3452
LD
(HL},.A
2FFl
23
3453
INC
HL
2FF2
Fl
3454
POP
AF
2FF:3
F5
3455
PUSH
AF
2FF4
AE
W.56
XOR
(HLl
2FF5
E655
3457
AND
010101018
2FF7
AE
3458
XOR
iHL)
2FFS
77
3459
STHL1:
LD
(HU,A
lFF9
Fl
:3460
POP
?iF
lFFA
E1
2461
POP
HL
2FFB
C9
3462
RET
2FFC
3463
END
( I I t
TOTAL
ASSEMBLER
ERRORS
= 0
/ I l
-----"--/.

Navigation menu