hunt now works correctly

This commit is contained in:
FeralChild64 committed 2021-01-16 23:21:49 +01:00
1 parent 256256aa25
commit d47b0cf841
5 files changed
+22 -10

No files matched your search

+1 -1
View File
@@ -195,7 +195,7 @@ Jump_Table:
!word Mon_Disassemble ; D
!word Mon_Fill ; F
!word Mon_Go ; G XXX to be debugged/adapted
!word Mon_Hunt ; H XXX to be bugfixed
!word Mon_Hunt ; H
!word Mon_JSR ; J XXX to be debugged/adapted
!word Mon_Memory ; M
!word Mon_Register ; R
+1 -4
View File
@@ -11,10 +11,7 @@ Mon_Fill:
jsr Get_Addr_To_LAC ; Long_AC = fill byte
+beq Mon_Error
lda Long_AC+1
ora Long_AC+2
ora Long_AC+3
+bne Mon_Error ; only 1 fill byte allowed
jsr Syntax_Byte_AC ; only 1 fill byte allowed
ldz #$00
+2 -4
View File
@@ -28,6 +28,7 @@ Mon_Hunt:
@bin:
jsr Got_Addr_To_LAC
jsr Syntax_Byte_AC
@lpbin:
@@ -36,10 +37,7 @@ Mon_Hunt:
iny
jsr Get_Addr_To_LAC
beq @hunt
lda Long_AC+1
ora Long_AC+2
ora Long_AC+3
+bne Mon_Error ; value above $FF
jsr Syntax_Byte_AC
cpy #32 ; max data length
bne @lpbin
+1 -1
View File
@@ -40,7 +40,7 @@ Get_Addr_To_LAC:
; at this point .Y value determines a numeric system
jsr Get_Char
beq @exit ; '?', ':'', ';' and zero terminate
beq @exit ; branch if terminated
cmp #'0'
bcc @exit
cmp #':'
+17
View File
@@ -0,0 +1,17 @@
; Monitor helper code - syntax checking
Syntax_Byte_AC: ; ensure AC contains a 1-byte value
php
pha
lda Long_AC+1
ora Long_AC+2
ora Long_AC+3
+bne Mon_Error ; value above $FF
pla
plp
rts