mirror of
https://github.com/irmen/prog8.git
synced 2025-01-26 19:30:59 +00:00
also other targets
This commit is contained in:
parent
b3d98be862
commit
a14c192ea3
@ -431,4 +431,9 @@ cx16 {
|
||||
}}
|
||||
}
|
||||
|
||||
sub cpu_is_65816() -> bool {
|
||||
; Returns true when you have a 65816 cpu, false when it's a 6502.
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -939,4 +939,10 @@ cx16 {
|
||||
rts
|
||||
}}
|
||||
}
|
||||
|
||||
sub cpu_is_65816() -> bool {
|
||||
; Returns true when you have a 65816 cpu, false when it's a 6502.
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -938,4 +938,9 @@ cx16 {
|
||||
}}
|
||||
}
|
||||
|
||||
sub cpu_is_65816() -> bool {
|
||||
; Returns true when you have a 65816 cpu, false when it's a 6502.
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1157,16 +1157,18 @@ sub search_x16edit() -> ubyte {
|
||||
}
|
||||
|
||||
asmsub cpu_is_65816() -> bool @A {
|
||||
; Returns true if you have a 65816 cpu, false if it's a 6502.
|
||||
; for Prog8 with the 64tass assembler, call in 8 bit mode only
|
||||
; Returns true when you have a 65816 cpu, false when it's a 6502.
|
||||
%asm {{
|
||||
.cpu '65816' ; let 64tass use the xba opcode
|
||||
lda #1 ; set up for a <> b exchange
|
||||
xba ; exchange will be a nop on a 65C02
|
||||
lda #0 ; set up for second exchange
|
||||
xba ; exchange will be a nop on the 65C02
|
||||
rts
|
||||
.cpu 'w65c02'
|
||||
php
|
||||
clv
|
||||
.byte $e2, $ea ; SEP #$ea, should be interpreted as 2 NOPs by 6502. 65c816 will set the Overflow flag.
|
||||
bvc +
|
||||
lda #1
|
||||
plp
|
||||
rts
|
||||
+ lda #0
|
||||
plp
|
||||
rts
|
||||
}}
|
||||
}
|
||||
|
||||
|
@ -526,4 +526,10 @@ cx16 {
|
||||
rts
|
||||
}}
|
||||
}
|
||||
|
||||
sub cpu_is_65816() -> bool {
|
||||
; Returns true when you have a 65816 cpu, false when it's a 6502.
|
||||
return false
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user