-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathc64.def
More file actions
66 lines (53 loc) · 1.49 KB
/
Copy pathc64.def
File metadata and controls
66 lines (53 loc) · 1.49 KB
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
60
61
62
63
64
65
; demonstration program utility defines
#ifndef EMURAM
EMURAM = $3600
#endif
PAYLOAD = EMURAM+$0200
KERNEL = $0a00
HARNESS = $0b00
VMSADDR = $0c00
BAILOUT = VMSADDR+0
DORTS = VMSADDR+3
VMU = VMSADDR+15
; a ROM routine to take a character in .a and display it
CHROUT = $ffd2
; carriage return character
CR = $0d
; a flag location that can be live during the run of the demo program
FLAG = $02
; 6o6 configuration
#define HELPINGS 1
#define HELPINGSALWAYS 1
#define FAULTLESS 0
#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 */