-
Notifications
You must be signed in to change notification settings - Fork 0
/
dmem.s
48 lines (46 loc) · 1.18 KB
/
dmem.s
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
; %help
; dmem -- Display davex dynamic memory info.
;
; syntax: dmem
; %hend
.pc02
.include "davex-mg.inc"
DX_start dx_mg_auto_origin ; load address
DX_info $01,$12,dx_cc_any,$00
DX_ptab
DX_end_ptab
DX_desc "Display DaveX dynamic memory info."
DX_main
jsr xmess
asc_hi "Dynamic memory available to external cmds:"
.byte $8d,$8d,00
ldx #mli_close ; free all
jsr xmmgr ; ask for it
; fall-through
.proc showfree
ldx #mli_read ; num free pages
jsr xmmgr ; ask for it
pha
tay
lda #$00
jsr xprdec_2
jsr xmess
asc_hi " page"
.byte $00
pla
tay
lda #$00
jsr xplural
jsr xmess
asc_hi " free"
.byte $8d
asc_hi "Lowest page: $"
.byte $00
ldx #mli_gfinfo ; lowest free page
jsr xmmgr
jsr $fdda ; prbyte
jsr xmess
.byte $8d,00
rts
.endproc
DX_end