mirror of
https://github.com/mi57730/a2d.git
synced 2025-02-20 02:29:11 +00:00
Rewrite quit_code to use ca65 '816 mnemonics and provide some analysis (#79)
* Convert '816 quit code to use ca65 65816 mode. Add commentary on this code.
This commit is contained in:
parent
1e16555b11
commit
68766cb60b
@ -7514,11 +7514,18 @@ stack_data:
|
|||||||
.addr $DEAF,$DEAD ; ???
|
.addr $DEAF,$DEAD ; ???
|
||||||
|
|
||||||
quit_code:
|
quit_code:
|
||||||
.byte $18,$FB,$5C,$04,$D0,$E0
|
;;; note that GS/OS GQUIT is called by ProDOS at $E0D000
|
||||||
;; 65816 code:
|
;;; to quit back to GS/OS.
|
||||||
;; 18 clc ; clear carry
|
;;; since DeskTop pre-dates GS/OS, it's likely that this does
|
||||||
;; FB xce ; exchange carry/emulation (i.e. turn on 16 bit)
|
;;; a similar function for ProDOS 16.
|
||||||
;; 5C 04 D0 E0 jmp $E0D004 ; long jump
|
;;; with GS/OS 5 and 6, this code potentially messes up
|
||||||
|
;;; the shadow register, $C035
|
||||||
|
.pushcpu
|
||||||
|
.setcpu "65816"
|
||||||
|
clc
|
||||||
|
xce ; enter native mode
|
||||||
|
jmp $E0D004 ; ProDOS 8->16 QUIT, presumably
|
||||||
|
.popcpu
|
||||||
|
|
||||||
DEFINE_QUIT_PARAMS quit_params
|
DEFINE_QUIT_PARAMS quit_params
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user