diff --git a/kernal/cbm/editor.s b/kernal/cbm/editor.s index dc9043cb..50e6e2d4 100644 --- a/kernal/cbm/editor.s +++ b/kernal/cbm/editor.s @@ -141,6 +141,7 @@ scrorg php .pushcpu .setcpu "65816" sep #$20 + .A8 pha lda $02,S and #4 diff --git a/kernal/cbm/memory.s b/kernal/cbm/memory.s index 3ee0c2d5..fdd453dc 100644 --- a/kernal/cbm/memory.s +++ b/kernal/cbm/memory.s @@ -96,8 +96,8 @@ iobase php .pushcpu .setcpu "65816" - sep #$20 + .A8 pha lda $02,S and #4 diff --git a/kernal/drivers/x16/65c816/interrupt.s b/kernal/drivers/x16/65c816/interrupt.s index d87da5ba..d76d823b 100644 --- a/kernal/drivers/x16/65c816/interrupt.s +++ b/kernal/drivers/x16/65c816/interrupt.s @@ -126,6 +126,8 @@ c816_abort_native: jmp (inabort) .segment "MEMDRV" +.A8 +.I8 __irq_65c816_first: xba pha @@ -161,6 +163,8 @@ __interrupt_65c816_native_ret: xce ; exit emulation mode __interrupt_65c816_native_kernal_impl_ret: rep #$31 ; 16-bit accumulator, clear carry + .A16 + .I16 pla ; pull old stack pointer tcs ; restore stack pointer ply @@ -169,6 +173,8 @@ __interrupt_65c816_native_kernal_impl_ret: rti nnnmi: + .A16 + .I16 sec xce .A8 @@ -180,6 +186,7 @@ nnnmi: nncop: nnabort: sep #$20 + .A8 jmp nncop_abort_ret .popcpu diff --git a/kernal/drivers/x16/65c816/stack.s b/kernal/drivers/x16/65c816/stack.s index 64eb509f..4340232c 100644 --- a/kernal/drivers/x16/65c816/stack.s +++ b/kernal/drivers/x16/65c816/stack.s @@ -15,6 +15,8 @@ stack_one: .res 1 .segment "MACHINE" .proc stack_init + .A8 + .I8 lda #$01 sta stack_one rts @@ -31,6 +33,8 @@ stack_one: .res 1 ; Output: ;-------------------------------------------------------------- .proc stack_push + .A16 + .I16 ply lda stack_counter beq @counter_zero @@ -58,6 +62,8 @@ stack_one: .res 1 .endproc .proc stack_pop + .A16 + .I16 ply lda stack_counter dec @@ -81,10 +87,14 @@ stack_one: .res 1 .endproc .proc stack_enter_kernal_stack + .A16 + .I16 lda stack_ptr jmp stack_push .endproc .proc stack_leave_kernal_stack + .A16 + .I16 jmp stack_pop .endproc diff --git a/kernal/drivers/x16/memory.s b/kernal/drivers/x16/memory.s index 72e58d11..2e1b7938 100644 --- a/kernal/drivers/x16/memory.s +++ b/kernal/drivers/x16/memory.s @@ -306,6 +306,8 @@ __irq: .pushcpu .setcpu "65816" +.A8 +.I8 .segment "KRAM816" .export __irq_65c816_saved @@ -429,6 +431,8 @@ __irq_ret: .segment "KRAM816B" .pushcpu .setcpu "65816" +.A8 +.I8 necop: neabort: