-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.asm
72 lines (55 loc) · 955 Bytes
/
test.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
BITS 16
%include "system.inc"
SECTION .text
push TitleStr
push PrintTitle
call KernelCall
push TestStr
push PrintString
call KernelCall
push 0xA5DF
push PrintHex
call KernelCall
push PrintNewLine
call KernelCall
push 54321
push PrintUInt
call KernelCall
push PrintNewLine
call KernelCall
push -12345
push PrintInt
call KernelCall
push PrintNewLine
call KernelCall
push InpStr
push PrintString
call KernelCall
push 12
push BuffFill1
push ReadStringSafe
call KernelCall
push PrintNewLine
call KernelCall
push 20
push BuffTest1
push ReadStringSafe
call KernelCall
push PrintNewLine
call KernelCall
push 15
push Buff1
push ReadStringSafe
call KernelCall
push PrintNewLine
call KernelCall
;TODO: More testing code
retf
SECTION .data
TestStr db 'This is a string', 0xD, 0xA, 0
TitleStr db 'This is a title', 0
InpStr db 'Test Input: ', 0
BuffFill1 db 'Input text 1', 0
BuffTest1 db 0, 'This should not be printed', 0
SECTION .bss
Buff1 resb 16