mirror of
https://github.com/irmen/prog8.git
synced 2024-11-23 07:32:10 +00:00
c64 system reset now banks kernel rom back in
This commit is contained in:
parent
48858019b7
commit
d110d1cb5f
@ -35,7 +35,7 @@ internal object C64Target: CompilationTarget {
|
||||
if(altEncoding) Petscii.decodeScreencode(bytes, true) else Petscii.decodePetscii(bytes, true)
|
||||
override fun asmGenerator(program: Program, errors: ErrorReporter, zp: Zeropage, options: CompilationOptions, path: Path) =
|
||||
AsmGen(program, errors, zp, options, path)
|
||||
override val asmForSystemReset = " sei | jmp (c64.RESET_VEC)" // TODO enable kernal rom bank
|
||||
override val asmForSystemReset = " sei | lda #14 | sta $1 | jmp (c64.RESET_VEC)"
|
||||
override val initProcName = "c64.init_system"
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
%import c64textio
|
||||
;%import c64flt
|
||||
;%option enable_floats
|
||||
%zeropage basicsafe
|
||||
; TODO system reset should also work when kernal is paged out
|
||||
%zeropage kernalsafe
|
||||
|
||||
|
||||
main {
|
||||
@ -10,20 +9,23 @@ main {
|
||||
|
||||
sub start() {
|
||||
|
||||
uword ub1
|
||||
word ww1
|
||||
uword ii
|
||||
%asm {{
|
||||
sei
|
||||
ldy #0
|
||||
sty $1
|
||||
lda #0
|
||||
- sta $f000,y
|
||||
iny
|
||||
bne -
|
||||
- lda $f000,y
|
||||
sta $0400,y
|
||||
iny
|
||||
bne -
|
||||
}}
|
||||
|
||||
for ii in 0 to 20 {
|
||||
; ub1 = ii
|
||||
; ub1 *= 40 ; TODO implement non-stack optimized muls
|
||||
; todo a = EXPRESSION * const -> is that optimized?
|
||||
ub1 = ii * 15
|
||||
txt.print_uw(ub1)
|
||||
c64.CHROUT(',')
|
||||
ub1 = 1+(ii * 15)
|
||||
txt.print_uw(ub1)
|
||||
c64.CHROUT('\n')
|
||||
repeat 60000 {
|
||||
ubyte a = sin (3)
|
||||
a++
|
||||
}
|
||||
|
||||
;asmsub clear_screen (ubyte char @ A, ubyte color @ Y) clobbers(A) { ...}
|
||||
|
Loading…
Reference in New Issue
Block a user