Fix run on linux
This commit is contained in:
@@ -66,6 +66,8 @@ N2H ds 2
|
||||
|
||||
code
|
||||
org $200
|
||||
lda #1
|
||||
sta $dc02
|
||||
TEST ldy #1 ; initialize Y (used to loop through carry flag values)
|
||||
sty ERROR ; store 1 in ERROR until the test passes
|
||||
lda #0 ; initialize N1 and N2
|
||||
@@ -111,24 +113,33 @@ LOOP2 lda N1 ; N1L = N1 & $0F
|
||||
bne DONE
|
||||
NEXT1 inc N1 ; [5] see text
|
||||
bne LOOP2 ; loop through all 256 values of N1
|
||||
NEXT2 inc N2 ; [6] see text
|
||||
NEXT2 lda #'*'
|
||||
sta $dc00
|
||||
inc N2 ; [6] see text
|
||||
bne LOOP1 ; loop through all 256 values of N2
|
||||
dey
|
||||
bpl LOOP1 ; loop through both values of the carry flag
|
||||
lda #0 ; test passed, so store 0 in ERROR
|
||||
sta ERROR
|
||||
DONE
|
||||
lda #0
|
||||
jsr RCHAR
|
||||
lda #1
|
||||
cmp ERROR
|
||||
beq _E
|
||||
lda #'P'
|
||||
sta $dc00
|
||||
jmp _E2
|
||||
_E lda #'F'
|
||||
sta $dc00
|
||||
_E2
|
||||
_E2 jsr RCHAR
|
||||
end_of_test
|
||||
|
||||
|
||||
RCHAR sta $dc00
|
||||
lda #'\r'
|
||||
sta $dc00
|
||||
lda #'\n'
|
||||
sta $dc00
|
||||
rts
|
||||
|
||||
; Calculate the actual decimal mode accumulator and flags, the accumulator
|
||||
; and flag results when N1 is added to N2 using binary arithmetic, the
|
||||
; predicted accumulator result, the predicted carry flag, and the predicted
|
||||
|
||||
@@ -735,7 +735,9 @@ data_bss_end
|
||||
|
||||
code
|
||||
org code_segment
|
||||
start cld
|
||||
start lda #1
|
||||
sta $dc02
|
||||
cld
|
||||
ldx #$ff
|
||||
txs
|
||||
lda #0 ;*** test 0 = initialize
|
||||
|
||||
Reference in New Issue
Block a user