-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathc64g.def
60 lines (47 loc) · 1.37 KB
/
c64g.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
; georam, no payload in main memory
PAYLOAD = $4100
HARNESS = $1000
VMSADDR = $1100
BAILOUT = VMSADDR+0
DORTS = VMSADDR+3
VMU = VMSADDR+15
; cache the current page
curpage = $02
; 6o6 configuration
; we present a full 64K address space and don't fault on stack, so we can
; be completely faultless
#define HELPINGS 1
#define HELPINGSALWAYS 1
#define FAULTLESS 1
#define NO_SADDR_IN_FILE 1
; 6o6 defines
; simulated register locations in zero page
; these must be preserved between calls to the vm
areg = $8b
xreg = $8c
yreg = $8d
preg = $fb
sptr = $fc
pc = $fd ; and $fe
; extra helpings mode
ehmode = $a6
; work area for memory access
dptr = $8e ; and $8f
; work area for instruction dispatch
hold0 = $9f
hold1 = $a5 ; need not be configuous
abandon = $9e ; save stack pointer if we abandon ship (protection fault?)
; reserved work areas for the harness/kernel (if they want)
; these should be contiguous
hhold0 = $be
hhold1 = $bf
; 6o6 return codes
#define R_OK 0 /* all's well */
#define R_BRK 1 /* break has occurred (replaces B flag) */
#define R_MFAULT 2 /* memory fault propagated from harness */
#define R_BADINS 3 /* totally illegal instruction */
#define R_UDI 4 /* user-defined (debug) irq -- check x for
the passed parameter */
#define R_STACKUNDER 5 /* stack underflow, propagated from harness
or dorts */
#define R_STACKOVER 6 /* stack overflow, same */