mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-04 00:29:17 +00:00
11 lines
237 B
ArmAsm
11 lines
237 B
ArmAsm
|
|
; relies on different behavior of decimal mode on 6502 vs 65c02
|
|
detect_65c02:
|
|
sed ; set decimal mode
|
|
clc ; clear carry for add
|
|
lda #$99 ; 99 decimal
|
|
adc #$01 ; +1 gives 00 and sets Z on 65C02
|
|
cld ; exit decimal mode
|
|
|
|
rts
|