;0bbd
;0bd8 related to 0017 and 0021 (only lower 3 bits used)
;0bd9 also related
-;0bc0 machine capabilities flags
+;0bc0 machine peripheral configuration flags
; bit0: have dumb mech
; bit1: have a changer
; bit2: have card reader
8E5A F6 00 09 ... ldab 0009
8E5D 4F O clra
8E5E BD FE 32 ..2 jsr fe32 ;jump25
-8E61 8E 7B 00 00 .{.. ; array data for jump25
-8E65 8E 81 00 01 ....
-8E69 8E 87 00 04 ....
-8E6D 8F 01 00 05 ....
-8E71 8F 09 00 01 ....
-8E75 8F 0C FF F5 ....
+8E61 8E 7B 00 00 .{.. ; no key
+8E65 8E 81 00 01 .... ; key 1 - toggle?
+8E69 8E 87 00 04 .... ; key 5 - save and next
+8E6D 8F 01 00 05 .... ; key 0 - exit
+8E71 8F 09 00 01 .... ; key reset - exit
+8E75 8F 0C FF F5 .... ; default
8E79 00 00 .. ; end of array data
-8E7B BD 9C 15 ... jsr 9c15 ;jump111
+;
+8E7B BD 9C 15 ... jsr 9c15 ;jump111 - write the option name
8E7E 7E 8F 0C ~.. jmp 8f0c ;goto12
+;
8E81 BD A7 5F .._ jsr a75f ;jump133
8E84 7E 8F 0C ~.. jmp 8f0c ;goto12
+;
8E87 F6 00 48 ..H ldab 0048
8E8A C1 08 .. cmpb #08
8E8C 25 05 %. bcs 05
8EA0 F6 00 48 ..H ldab 0048
8EA3 C1 01 .. cmpb #01
8EA5 26 0F &. bne 0f
+;
8EA7 F6 00 67 ..g ldab 0067
8EAA C4 02 .. andb #02
8EAC 26 08 &. bne 08
8EAE F6 00 48 ..H ldab 0048
8EB1 CB 02 .. addb #02
8EB3 F7 00 48 ..H stab 0048
+;
8EB6 F6 00 48 ..H ldab 0048
8EB9 C1 02 .. cmpb #02
8EBB 26 0A &. bne 0a
8EF3 7F 00 48 ..H clr 0048
8EF6 F6 0B C0 ... ldab 0bc0
8EF9 F7 00 67 ..g stab 0067
-8EFC BD 9C 15 ... jsr 9c15 ;jump111
+8EFC BD 9C 15 ... jsr 9c15 ;jump111 - write the next option
8EFF 20 0B . bra 0b
+;
8F01 BD A4 59 ..Y jsr a459 ;jump110
8F04 BD 85 AF ... jsr 85af ;jump14
8F07 20 03 . bra 03
9C18 F6 00 48 ..H ldab 0048
9C1B 4F O clra
9C1C BD FE 16 ... jsr fe16 ;jump2
-9C1F 00 . test
-9C20 00 . test
-9C21 00 . test
-9C22 0A . clv
-9C23 9D 29 9C .). jsr 29
-9C26 3B ; rti
-9C27 9C 53 9C .S. cmpx 53
-9C2A 6B k illegal
-9C2B 9C 83 9C ... cmpx 83
-9C2E 9B 9C B2 ... adda 9c
-9C31 9C C9 9C ... cmpx c9
-9C34 E0 9C .. subb 9c,x
-9C36 F7 9D 0E ... stab 9d0e
-9C39 9D 23 F6 .#. jsr 23
-9C3C 00 . test
-9C3D 67 C4 g. asr c4,x
-9C3F 02 . idiv
+9C1F 00 00 00 0A . 0..10
+9C23 9D 29 .). ;
+9C25 9C 3B ; ;
+9C27 9C 53 .S. ;
+9C29 9C 6B k ;
+9C2B 9C 83 ... ;
+9C2D 9C 9B ... ;
+9C2F 9C B2 ... ;
+9C31 9C C9 ... ;
+9C33 9C E0 ... ;
+9C35 9C F7 .. ;
+9C37 9D 0E ... ;
+9C39 9D 23 .#. ;
+9C3B F6 00 67 . ldab 0067
+9C3D C4 02 g. andb #02
9C40 27 08 '. beq 08
9C42 CC AF 00 ... ldd #af00 ; "LNK MSTR Y"
9C45 BD C0 BA ... jsr c0ba ;display:
9C4A CC AF 0B ... ldd #af0b ; "LNK MSTR N"
9C4D BD C0 BA ... jsr c0ba ;display:
9C50 7E 9D 29 ~.) jmp 9d29 ;goto18
+;
9C53 F6 00 67 ..g ldab 0067
9C56 C4 10 .. andb #10
9C58 27 08 '. beq 08
9C62 CC AF 4D ..M ldd #af4d ; "PRC HOLD N"
9C65 BD C0 BA ... jsr c0ba ;display:
9C68 7E 9D 29 ~.) jmp 9d29 ;goto18
+;
9C6B F6 00 67 ..g ldab 0067
9C6E C4 20 . andb #20
9C70 27 08 '. beq 08
9C7A CC AF 63 ..c ldd #af63 ; "PRC DISP N"
9C7D BD C0 BA ... jsr c0ba ;display:
9C80 7E 9D 29 ~.) jmp 9d29 ;goto18
+;
9C83 F6 00 67 ..g ldab 0067
9C86 C4 01 .. andb #01
9C88 27 08 '. beq 08
A75F F6 00 48 ..H ldab 0048
A762 4F O clra
A763 BD FE 16 ... jsr fe16 ;jump2
-A766 00 . test
-A767 00 . test
-A768 00 . test
-A769 09 . dex
-A76A A7 DC .. staa dc,x
-A76C A7 80 .. staa 80,x
-A76E A7 87 .. staa 87,x
-A770 A7 8E .. staa 8e,x
-A772 A7 95 .. staa 95,x
-A774 A7 9C .. staa 9c,x
-A776 A7 A3 .. staa a3,x
-A778 A7 AA .. staa aa,x
-A77A A7 B1 .. staa b1,x
-A77C A7 C4 .. staa c4,x
-A77E A7 D7 .. staa d7,x
+A766 00 00 00 09 . test
+A76A A7 DC .. ;
+A76C A7 80 .. ;
+A76E A7 87 .. ;
+A770 A7 8E .. ;
+A772 A7 95 .. ;
+A774 A7 9C .. ;
+A776 A7 A3 .. ;
+A778 A7 AA .. ;
+A77A A7 B1 .. ;
+A77C A7 C4 .. ;
+A77E A7 D7 .. ;
+;
A780 C6 02 .. ldab #02
A782 F7 00 02 ... stab 0002
A785 20 55 U bra 55
+;
A787 C6 10 .. ldab #10
A789 F7 00 02 ... stab 0002
A78C 20 4E N bra 4e
C67D F6 00 30 ..0 ldab 0030
C680 26 55 &U bne 55
C682 F6 0B C0 ... ldab 0bc0
-C685 C4 04 .. andb #04
+C685 C4 04 .. andb #04 ; have a card reader
C687 26 4E &N bne 4e
C689 C6 27 .' ldab #27
C68B F7 10 2D ..- stab 102d ; disable SCI transmission
C69F CC 00 14 ... ldd #0014
C6A2 BD E5 71 ..q jsr e571 ;msdelay
C6A5 F6 0B C0 ... ldab 0bc0
-C6A8 C4 01 .. andb #01
+C6A8 C4 01 .. andb #01 ; have a dumb mech
C6AA 27 06 '. beq 06
C6AC CE 0B C1 ... ldx #0bc1
C6AF 1C 00 01 ... bset 00,x, #01 ; set changer powerup error bit
sciinterrupt:
C81C 34 4 des
+; make sure this interrupt is valid
C81D F6 0B C0 ... ldab 0bc0
C820 C4 01 .. andb #01 ; do we have a dumb mech?
C822 26 0A &. bne 0a ; if so, to c82e
C82B 7E CB FF ~.. jmp cbff ; else to goto44
;
C82E C6 96 .. ldab #96 ; 150
-C830 F7 00 30 ..0 stab 0030 ; changer related still
+C830 F7 00 30 ..0 stab 0030 ; changer related still?
C833 F6 10 2E ... ldab 102e ; SCI status
C836 C4 02 .. andb #02 ; test for Framing Error
C838 26 0B &. bne 0b ; if so, to c845
CBF9 7F 00 3D ..= clr 003d
CBFC 7E CE 46 ~.F jmp ce46 ;goto47 (exit)
;
+;
+;
+;
+;
goto44:
CBFF F6 0B C0 ... ldab 0bc0 ; do we have a changer?
CC02 C4 02 .. andb #02
CC04 26 03 &. bne 03 ; if so, swallow & exit
CC06 7E CE 3B ~.; jmp ce3b ; goto54 - swallow a byte & exit
- ; else
;
CC09 F6 10 2F ../ ldab 102f ; read SCI data
-CC0C C4 E0 .. andb #e0
-CC0E C1 20 . cmpb #20
+CC0C C4 E0 .. andb #e0 ; 11100000
+CC0E C1 20 . cmpb #20 ; 00100000
CC10 27 03 '. beq 03
CC12 7E CE 3B ~.; jmp ce3b ;goto54 - swallow a byte & exit
;
CC4F F6 00 08 ... ldab 0008
CC52 26 03 &. bne 03
CC54 7E CD 94 ~.. jmp cd94 ;goto56
+;
CC57 F6 10 2F ../ ldab 102f ; read SCI data
-CC5A C4 F0 .. andb #f0
-CC5C C1 20 . cmpb #20
+CC5A C4 F0 .. andb #f0 ; 11110000
+CC5C C1 20 . cmpb #20 ; 00100000
CC5E 27 03 '. beq 03
CC60 7E CD 94 ~.. jmp cd94 ;goto56
CC63 F6 10 2F ../ ldab 102f ; read SCI data
CDC6 C4 08 .. andb #08
CDC8 27 0C '. beq 0c
CDCA F6 0B C0 ... ldab 0bc0
-CDCD C4 10 .. andb #10
+CDCD C4 10 .. andb #10 ; have link master price holding
CDCF 27 05 '. beq 05
CDD1 7C 00 75 |.u inc 0075
CDD4 20 03 . bra 03
CDF2 C4 08 .. andb #08
CDF4 27 0A '. beq 0a
CDF6 F6 0B C0 ... ldab 0bc0
-CDF9 C4 10 .. andb #10
+CDF9 C4 10 .. andb #10 ; have link master price holding
CDFB 27 03 '. beq 03
CDFD 7C 00 75 |.u inc 0075
CE00 20 1C . bra 1c
D216 C4 04 .. andb #04
D218 26 12 &. bne 12
D21A F6 0B C0 ... ldab 0bc0
-D21D C4 10 .. andb #10 ; am i link master?
+D21D C4 10 .. andb #10 ; have link master price holding
D21F 26 0B &. bne 0b
D221 CE 00 00 ... ldx #0000
D224 3C < pshx
jump116:
; revolves around coinage
DEE7 F6 0B C0 ... ldab 0bc0
-DEEA C4 01 .. andb #01
+DEEA C4 01 .. andb #01 ; have a dumb mech
DEEC 26 07 &. bne 07
DEEE F6 0B C0 ... ldab 0bc0
-DEF1 C4 04 .. andb #04
+DEF1 C4 04 .. andb #04 ; have a card reader
DEF3 27 15 '. beq 15
DEF5 C6 FF .. ldab #ff
DEF7 F7 0B BC ... stab 0bbc
DF05 BD DC A3 ... jsr dca3 ;jump29
DF08 20 25 % bra 25
DF0A F6 0B C0 ... ldab 0bc0
-DF0D C4 02 .. andb #02
+DF0D C4 02 .. andb #02 ;have changer
DF0F 27 1E '. beq 1e
DF11 F6 00 2F ../ ldab 002f
DF14 26 19 &. bne 19
DFA8 C1 04 .. cmpb #04
DFAA 24 07 $. bcc 07
DFAC F6 0B C0 ... ldab 0bc0
-DFAF C4 01 .. andb #01
+DFAF C4 01 .. andb #01 ; have a dumb mech
DFB1 26 07 &. bne 07
DFB3 F6 00 21 ..! ldab 0021
DFB6 C4 40 .@ andb #40
DFFA 38 8 pulx
DFFB 20 66 f bra 66
DFFD F6 0B C0 ... ldab 0bc0
-E000 C4 08 .. andb #08
+E000 C4 08 .. andb #08 ; have link master price holding
E002 27 52 'R beq 52
E004 F6 0B C1 ... ldab 0bc1
E007 C4 08 .. andb #08 ; test bill error bit
E0CF 4F O clra
E0D0 FD 00 4D ..M std 004d
E0D3 F6 0B C0 ... ldab 0bc0
-E0D6 2C 05 ,. bge 05
+E0D6 2C 05 ,. bge 05 ; free vend
E0D8 5F _ clrb
E0D9 4F O clra
E0DA FD 00 44 ..D std 0044
E0DD F6 0B C0 ... ldab 0bc0
-E0E0 C4 02 .. andb #02
+E0E0 C4 02 .. andb #02 ; have a changer
E0E2 26 03 &. bne 03
E0E4 BD DE 15 ... jsr de15 ;dump118
E0E7 F6 00 11 ... ldab 0011
E0EA C4 20 . andb #20
E0EC 26 1A &. bne 1a
E0EE F6 0B C0 ... ldab 0bc0
-E0F1 C4 02 .. andb #02
+E0F1 C4 02 .. andb #02 ; have a changer
E0F3 26 13 &. bne 13
E0F5 FC 00 40 ..@ ldd 0040
E0F8 F3 00 3E ..> addd 003e
E0FB B3 00 44 ..D subd 0044
E0FE 25 08 %. bcs 08
E100 F6 0B C0 ... ldab 0bc0
-E103 2D 03 -. blt 03
+E103 2D 03 -. blt 03 ; no free vend
E105 BD DA 64 ..d jsr da64 ;jump122
E108 FC 00 40 ..@ ldd 0040
E10B F3 00 3E ..> addd 003e
E10E B3 00 44 ..D subd 0044
E111 24 50 $P bcc 50
E113 F6 0B C0 ... ldab 0bc0
-E116 C4 10 .. andb #10
+E116 C4 10 .. andb #10 ; have link master price holding
E118 26 49 &I bne 49
E11A F6 00 2B ..+ ldab 002b
E11D C1 00 .. cmpb #00
E15D F7 00 2C .., stab 002c
E160 7E E5 5E ~.^ jmp e55e ;goto74
E163 F6 0B C0 ... ldab 0bc0
-E166 C4 01 .. andb #01
+E166 C4 01 .. andb #01 ; have a dumb mech
E168 26 11 &. bne 11
E16A F6 0B C0 ... ldab 0bc0
-E16D C4 04 .. andb #04
+E16D C4 04 .. andb #04 ; have a card reader
E16F 26 0A &. bne 0a
E171 F6 0B C0 ... ldab 0bc0
-E174 C4 0F .. andb #0f
+E174 C4 0F .. andb #0f ; have any coin input mechanism
E176 27 03 '. beq 03
E178 7E E3 35 ~.5 jmp e335 ;goto75
E17B FC 00 40 ..@ ldd 0040
E261 31 1 ins
E262 31 1 ins
E263 F6 0B C0 ... ldab 0bc0
-E266 2C 78 ,x bge 78
+E266 2C 78 ,x bge 78 ; free vend
E268 F6 00 06 ... ldab 0006
E26B 4F O clra
E26C 05 . asld
E332 7E E5 5E ~.^ jmp e55e ;goto74
goto75:
E335 F6 0B C0 ... ldab 0bc0
-E338 C4 02 .. andb #02
+E338 C4 02 .. andb #02 ; have a changer
E33A 26 03 &. bne 03
E33C 7E E5 5E ~.^ jmp e55e ;goto74
E33F 5F _ clrb
E350 FC 00 44 ..D ldd 0044
E353 26 1C &. bne 1c
E355 F6 0B C0 ... ldab 0bc0
-E358 C4 10 .. andb #10
+E358 C4 10 .. andb #10 ; have link master price holding
E35A 26 08 &. bne 08
E35C CE 00 21 ..! ldx #0021
E35F 1C 00 .. bset add,x 00,x
E36C F7 00 75 ..u stab 0075
E36F 20 57 W bra 57
E371 F6 0B C0 ... ldab 0bc0
-E374 C4 10 .. andb #10
+E374 C4 10 .. andb #10 ; have link master price holding
E376 27 50 'P beq 50
E378 FC 00 40 ..@ ldd 0040
E37B 26 4B &K bne 4b
E37D F6 0B C0 ... ldab 0bc0
-E380 C4 20 . andb #20
+E380 C4 20 . andb #20 ; have link master price holding - price display
E382 27 3E '> beq 3e
E384 CE 00 17 ... ldx #0017
E387 1C 00 01 ... bset 00,x, #01
E42C 1D 00 .. bclr add,x 00,x
E42E 80 39 .9 suba #39
E430 F6 0B C0 ... ldab 0bc0
-E433 C4 20 . andb #20
+E433 C4 20 . andb #20 ; link master - price display
E435 27 34 '4 beq 34
E437 F6 00 17 ... ldab 0017
E43A C4 01 .. andb #01
E4CD 4F O clra
E4CE BD C7 E7 ... jsr c7e7 ;jump37 - send to serial port
E4D1 F6 0B C0 ... ldab 0bc0
-E4D4 2D 03 -. blt 03
-E4D6 7E E5 58 ~.X jmp e558 ;goto78
+E4D4 2D 03 -. blt 03 ; free vend
+E4D6 7E E5 58 ~.X jmp e558 ;goto78 if not
E4D9 F6 0B C0 ... ldab 0bc0
-E4DC C4 10 .. andb #10
+E4DC C4 10 .. andb #10 ; link master - price holding
E4DE 26 78 &x bne 78
E4E0 F6 00 06 ... ldab 0006
E4E3 4F O clra
ECC8 7F 00 06 ... clr 0006
ECCB BD A6 4E ..N jsr a64e ;jump135
ECCE C6 09 .. ldab #09
-ECD0 F7 0B C0 ... stab 0bc0
+ECD0 F7 0B C0 ... stab 0bc0 ; defaults to having a bill validator & dumb mech
ECD3 7F 0E 6D ..m clr 0e6d
ECD6 C6 01 .. ldab #01
ECD8 F7 0E 6E ..n stab 0e6e