当我运行我的程序时,我遇到了错误页面边界。在适用于 Windows 10 的 CBM prg studio 应用程序的任何帮助中,它都没有解释我如何增加这个边界,或者我需要做什么来避免这些错误。
它发生在基于标签 E1cycle 和 E2cycle 内的第 110 行和第 127 行的同一条指令上......
**Line 110:** BEQ space2reset ; branch/jump if the result in A is 0
**Line 127:** BEQ space2reset ; branch/jump if the result in A is 0
The errors...
**Line 110**:Page boundary crossed. - F:\C64\UltimateTests\test.asm
**Line 127**:Page boundary crossed. - F:\C64\UltimateTests\test.asm
[Error] Line 72:Invalid branch (200 bytes) "BEQ Name2 ; if we find it we branch using BEQ to name2 for msg2 "
[Error] Line 143:Invalid branch (-275 bytes) "BEQ StartBlackOut"
此外,正如您在上面看到的,我收到了这些奇怪的(200 字节)和(-275 字节)无效的分支错误——这是代码部分......
getnameb
jsr $FF9F ;SCNKEY, place ASCII character into keyboard queue
jsr $FFE4 ;GETIN, this places the ASCII value into the Accumulator
BEQ getnameb ;loop until keys are pressed. (Branch if equal to zero)
JSR $FFD2 ; CHROUT, print it to the screen as it is being typed in.
CMP #13 ; CMP looks for the carrige return
BEQ Name2 ; if we find it we branch using BEQ to name2 for msg2
CMP #32 ; Looking for space bar. If true error 1 is returned
BEQ ErrorInput1
ldx $0900 ; load into x the value at $0900 - replace what was there from JSRs
STA $0019,x ; also store what is being typed in consecutively?
INX ; X IS INCREASED BY 1.
stx $0900 ; Store X back to $0900, avoid being molested by the above JSRs
; The value at $0900 is the length of the string!
LDA $0900 ; Load into A the current length of the string
CMP #08 ; Looking for max 8 chars. If true error 2 is returned
BEQ ErrorInput2
JMP getnameb ; if we don't we loop!
;PRINT ERRORS 1 OR 2
;-----1
ErrorInput1
LDX #00 ; load into the x registry zero
E1cycle
LDA E1msg,x ; load into A the E1msg, the x sequence.
CMP #00 ; compare memory and accumulator to the value 0?
BEQ space2reset ; branch/jump if the result in A is 0
STA 1424,x ; where on the screen does E1msg start?
INX ; inc x to move the print along 1 space?
JMP E1cycle ; jump back to the beginning of cycle and do it all again.
E1msg text 'ERROR: NO SPACES PERMITTED - SPACE TO RESET'
byte 0
;-----2
ErrorInput2
LDX #00 ; load into the x registry zero
E2cycle
LDA E2msg,x ; load into A the E1msg, the x sequence.
CMP #00 ; compare memory and accumulator to the value 0?
BEQ space2reset ; branch/jump if the result in A is 0
STA 1424,x ; where on the screen does E1msg start?
INX ; inc x to move the print along 1 space?
JMP E2cycle ; jump back to the beginning of cycle and do it all again.
E2msg text 'ERROR: MAX 8 CHARACTERS PERMITTED - SPACE TO RESET'
byte 0
space2reset
jsr $FF9F ;SCNKEY, place ASCII character into keyboard queue
jsr $FFE4 ;GETIN, this places the ASCII value into the Accumulator
BEQ space2reset ;loop until keys are pressed. (Branch if equal to zero)
CMP #32
BEQ StartBlackOut ; Go to the very beginning of the programming and reset the whole thing!
我需要用非常简单的术语向我解释这一点,因为我仍在学习,并且有时发现行话有点难以理解。谢谢!