-
Notifications
You must be signed in to change notification settings - Fork 15
/
ram.asm
72 lines (72 loc) · 1.57 KB
/
ram.asm
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
; TITLE BBC BASIC (C) R.T.RUSSELL 1984
;
;RAM MODULE FOR BBC BASIC INTERPRETER
;FOR USE WITH VERSION 2.0 OF BBC BASIC
;*STANDARD CP/M DISTRIBUTION VERSION*
;(C) COPYRIGHT R.T.RUSSELL 31-12-1983
;
PUBLIC ACCS
PUBLIC BUFFER
PUBLIC LINENO
PUBLIC TOP
PUBLIC PAGE
PUBLIC LOMEM
PUBLIC FREE
PUBLIC HIMEM
PUBLIC RANDOM
PUBLIC COUNT
PUBLIC WIDTH
PUBLIC ERL
PUBLIC ERR
PUBLIC ERRTRP
PUBLIC ERRTXT
PUBLIC TRACEN
PUBLIC AUTONO
PUBLIC INCREM
PUBLIC LISTON
PUBLIC DATPTR
PUBLIC FNPTR
PUBLIC PROPTR
PUBLIC STAVAR
PUBLIC OC
PUBLIC PC
PUBLIC DYNVAR
PUBLIC ERRLIN
PUBLIC USER
;
SECTION DATA
ALIGN 256
;
;n.b. ACCS, BUFFER & STAVAR must be on page boundaries.
;
ACCS: DEFS 256 ;STRING ACCUMULATOR
BUFFER: DEFS 256 ;STRING INPUT BUFFER
STAVAR: DEFS 27*4 ;STATIC VARIABLES
OC EQU STAVAR+15*4 ;CODE ORIGIN (O%)
PC EQU STAVAR+16*4 ;PROGRAM COUNTER (P%)
DYNVAR: DEFS 54*2 ;DYN. VARIABLE POINTERS
FNPTR: DEFS 2 ;DYN. FUNCTION POINTER
PROPTR: DEFS 2 ;DYN. PROCEDURE POINTER
;
PAGE: DEFS 2 ;START OF USER PROGRAM
TOP: DEFS 2 ;FIRST LOCN AFTER PROG.
LOMEM: DEFS 2 ;START OF DYN. STORAGE
FREE: DEFS 2 ;FIRST FREE-SPACE BYTE
HIMEM: DEFS 2 ;FIRST PROTECTED BYTE
;
LINENO: DEFS 2 ;LINE NUMBER
TRACEN: DEFS 2 ;TRACE FLAG
AUTONO: DEFS 2 ;AUTO FLAG
ERRTRP: DEFS 2 ;ERROR TRAP
ERRTXT: DEFS 2 ;ERROR MESSAGE POINTER
DATPTR: DEFS 2 ;DATA POINTER
ERL: DEFS 2 ;ERROR LINE
ERRLIN: DEFS 2 ;"ON ERROR" LINE
RANDOM: DEFS 5 ;RANDOM NUMBER
COUNT: DEFS 1 ;PRINT POSITION
WIDTH: DEFS 1 ;PRINT WIDTH
ERR: DEFS 1 ;ERROR NUMBER
LISTON: DEFS 1 ;LISTO & OPT FLAG
INCREM: DEFS 1 ;AUTO INCREMENT
;
USER: