-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsbasic.s
More file actions
152 lines (130 loc) · 2.78 KB
/
msbasic.s
File metadata and controls
152 lines (130 loc) · 2.78 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
.feature force_range
.debuginfo +
.setcpu "6502"
.macpack longbranch
CBM2 := 1
; configuration
CONFIG_2A := 1
CONFIG_CBM_ALL := 1
CONFIG_DATAFLG := 1
CONFIG_EASTER_EGG := 1
CONFIG_FILE := 1; support PRINT#, INPUT#, GET#, CMD
;CONFIG_NO_CR := 0; terminal doesn't need explicit CRs on line ends
CONFIG_NO_LINE_EDITING := 1; support for "@", "_", BEL etc.
CONFIG_NO_READ_Y_IS_ZERO_HACK := 1
CONFIG_PEEK_SAVE_LINNUM := 1
CONFIG_SCRTCH_ORDER := 2
; zero page
ZP_START1 = $40
ZP_START2 = $4D
ZP_START3 = $43
ZP_START4 = $53
; extra/override ZP variables
CURDVC := $000E
TISTR := $008D
Z96 := $0096
POSX := $00C6
TXPSV := LASTOP
USR := GORESTART ; XXX
; inputbuffer
INPUTBUFFER := $0200
; constants
SPACE_FOR_GOSUB := $3E
STACK_TOP := $FA
WIDTH := 40
WIDTH2 := 30
RAMSTART2 := $0400
; magic memory locations
;ENTROPY = $E844
ENTROPY = $8070 ; AJR - yet nothing there in IO space
.import serial_getc ; AJR
.import serial_putc ; AJR
.import serial_getc_echo ; AJR
.import kernal_clall ; AJR
; monitor functions
;OPEN := $FFC0
;CLOSE := $FFC3
;CHKIN := $FFC6
;CHKOUT := $FFC9
;CLRCH := $FFCC
;CHRIN := $FFCF
CHRIN := serial_getc_echo
;CHROUT := $FFD2
CHROUT := serial_putc
;LOAD := $FFD5
SAVE := $FFD8
VERIFY := $FFDB
SYS := $FFDE
ISCNTC := $FFE1
GETIN := $FFE4
CLALL := kernal_clall
; LE7F3 := $E7F3; for CBM1
MONCOUT := CHROUT
;MONRDKEY := GETIN
MONRDKEY := serial_getc_echo
CONFIG_2 := 1
CONFIG_11A := 1
CONFIG_11 := 1
CONFIG_10A := 1
;CONFIG_SMALL := 0
BYTES_FP := 5
CONFIG_SMALL_ERROR := 1
.ifndef BYTES_PER_ELEMENT
BYTES_PER_ELEMENT := BYTES_FP
.endif
BYTES_PER_VARIABLE := BYTES_FP+2
MANTISSA_BYTES := BYTES_FP-1
BYTES_PER_FRAME := 2*BYTES_FP+8
FOR_STACK1 := 2*BYTES_FP+5
FOR_STACK2 := BYTES_FP+4
.ifndef MAX_EXPON
MAX_EXPON = 10
.endif
STACK := $0100
.ifndef STACK2
STACK2 := STACK
.endif
.ifdef INPUTBUFFER
.if INPUTBUFFER >= $0100
CONFIG_NO_INPUTBUFFER_ZP := 1
.endif
.if INPUTBUFFER = $0200
CONFIG_INPUTBUFFER_0200 := 1
.endif
.endif
INPUTBUFFERX = INPUTBUFFER & $FF00
CR=13
LF=10
.ifndef CRLF_1
CRLF_1 := CR
CRLF_2 := LF
.endif
.include "basic/macros.s"
.include "basic/zeropage.s"
.include "basic/header.s"
.include "basic/token.s"
.include "basic/error.s"
.include "basic/message.s"
.include "basic/memory.s"
.include "basic/program.s"
.include "basic/flow1.s"
.include "basic/loadsave.s"
.include "basic/flow2.s"
.include "basic/misc1.s"
.include "basic/print.s"
.include "basic/input.s"
.include "basic/eval.s"
.include "basic/var.s"
.include "basic/array.s"
.include "basic/misc2.s"
.include "basic/string.s"
.include "basic/misc3.s"
.include "basic/poke.s"
.include "basic/float.s"
.include "basic/chrget.s"
.include "basic/rnd.s"
.include "basic/trig.s"
.include "basic/init.s"
.include "basic/extra.s"
.include "basic/r8load.s"
.include "basic/r8file.s"