-
Notifications
You must be signed in to change notification settings - Fork 85
/
mon.va
127 lines (127 loc) · 1.71 KB
/
mon.va
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
.PAGE 'MON.VA'
;
;
;
;
; *VIEW
;
; $V ADR1 ADR2
;
; DISPLAY DISK MEMORY (ADR1)-(ADR2)
;
;
VIEW JSR RDADR2 ; GET ADR1 ADR2
;
LDA ADR2 ; SAVE ENDING ADR
STA ADR4
LDA ADR2+1
STA ADR4+1
;
VIEW10 LDA ADR1 ; SET UP FOR M-R
CLC ; READ EIGHT BYTES IN
ADC #8
STA ADR2
LDA ADR1+1
ADC #0 ; TAKE CARE OF CARRY
STA ADR2+1
;
LDA #<BUF+10 ; ADR3 =BUF+10
STA ADR3
LDA #>BUF
STA ADR3+1
;
JSR CRLF ; PRINT (CRLF).$: ADR1
;
LDA #'. ; PROMT
JSR WROC
LDA #'$
JSR WROC
LDA #':
JSR WROC
JSR SPACE
;
LDA ADR1+1 ; HI BYTE
JSR WROB
LDA ADR1 ; LOW BYTE
JSR WROB
;
JSR MEMRD ; READ THE BYTES
;
LDX #0
STX PRMPTR ; TEMP BUF POINTER
;
VIEW30 JSR SPACE
LDX PRMPTR ; GET BUFFER POINTER
LDA BUF+10,X
JSR WROB ; WRITE OUT DATA BYTE
INC PRMPTR
LDA PRMPTR
CMP #8 ;TEST IF DONE
BNE VIEW30 ; NOT YET
;
SEC ;TEST IF DONE
LDA ADR2
SBC ADR4
LDA ADR2+1
SBC ADR4+1
BCC VIEW10
;
JMP STRT ; DONE WITH IT
;
;
;
;
;
; *ALTER
;
; $: ADR1 DD DD DD DD DD DD DD DD
;
;
; CHANGE DATA TO DD DD AT ADR1
;
;
ALTER JSR GETADR ; GET ADR1
;
LDA TMPO ; LET ADR3=TMP
STA ADR3
LDA TMPO+1
STA ADR3+1
;
LDA #0 ; PRMPTR TMP BUFFER POINTER
STA PRMPTR
;
ALTR10 JSR GETBYT ; GET DATA BYTES
LDX PRMPTR ; LOAD POINTER
STA BUF+20,X
;
INC PRMPTR
LDA PRMPTR
CMP #8 ; TEST IF DONE
BNE ALTR10
;
LDA #<BUF+20 ; SET UP START-END FOR MEMORY WRITE COMMAND
STA ADR1
LDA #<BUF+20+8
STA ADR2 ; STORE 8 BYTES
LDA #>BUF
STA ADR1+1
STA ADR2+1
;
JSR MEMWRT
JMP STRT
;
;
;
;
;
; *GETBYT
;
; READ NEXT HEX BYTE INTO .A
;
;
GETBYT JSR SYNCHK ; TEST SYNTAX
JMP RDOB
;
;
;
.END