-
Notifications
You must be signed in to change notification settings - Fork 0
/
mem.a86
56 lines (49 loc) · 1.3 KB
/
mem.a86
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
;
; Licensed under the MIT license. See LICENSE file in the project root for details.
;
title 'Memory'
cseg
mov cx,ds
mov es,cx
mov dx,offset mcb
mov cl,35h
int 0E0h
mov ax, word ptr mlen
mov cl,6
shr ax, cl
inc ax
mov bx,10
call print_uint16
lea si, msg_sep
call print_str
mov cx,0Ch
int 0E0h
cmp ax,1430h
jz ccpm3x
cmp ax,1431h
jz ccpm3x
int 12h
cmp ax,640
ja fixax
jmp prram
ccpm3x:
mov bx,40h
mov es,bx
mov bx,13h
mov ax, es:[bx]
fixax:
mov ax, 640
prram:
mov bx,10
call print_uint16
lea si, msg_nl
call print_str
call quit
include tinylib.a86
dseg
mcb dw 0
mlen dw 65534
mext db 0
msg_sep db 'K/',0
msg_nl db 'K',13,10,0
end