-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathWMemory.inc
More file actions
37 lines (37 loc) · 743 Bytes
/
WMemory.inc
File metadata and controls
37 lines (37 loc) · 743 Bytes
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
.286
WriteMemory MACRO HexNum
Local WriteMem
Local NextNum
Local MemEnd
Local NextMem
pusha
mov dl, 15 ;X coordinated
mov cx, 2
WriteMem:
mov ax, 0
mov ah, 02 ;SetCursorPosition
mov dh, 0 ;Ycoordinated
mov bx, 0
int 10h
lea di, HexNum
NextMem:
mov al, [di]
cmp al, 24h
je MemEnd
mov bl, 0ACh ;Color is red
mov bh, 0 ;Display page
mov ah, 0Eh ;Teletype
int 10h
mov ax, 0
mov ah, 02h ;SetCursorPosition
inc dh ;X coordinated
mov bx, 0
int 10h
inc di
jmp NextMem
MemEnd:
lea di, HexNum
mov dl, 35 ;X coordinated
loop WriteMem
popa
ENDM WriteMemory