-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathSerial.asm
More file actions
65 lines (52 loc) · 1.3 KB
/
Serial.asm
File metadata and controls
65 lines (52 loc) · 1.3 KB
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
; Generated at 6/14/2016 12:11:29 PM
%ifndef Exclude_IOPort_Based_SerialInit
DebugStub_InitSerial:
mov word DX, 0x1
mov byte AL, 0x0
Call DebugStub_WriteRegister
mov word DX, 0x3
mov byte AL, 0x80
Call DebugStub_WriteRegister
mov word DX, 0x0
mov byte AL, 0x1
Call DebugStub_WriteRegister
mov word DX, 0x1
mov byte AL, 0x0
Call DebugStub_WriteRegister
mov word DX, 0x3
mov byte AL, 0x3
Call DebugStub_WriteRegister
mov word DX, 0x2
mov byte AL, 0xC7
Call DebugStub_WriteRegister
mov word DX, 0x4
mov byte AL, 0x3
Call DebugStub_WriteRegister
DebugStub_InitSerial_Exit:
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_InitSerial_Exit
Ret
DebugStub_ComReadAL:
mov word DX, 0x5
DebugStub_ComReadAL_Wait:
Call DebugStub_ReadRegister
test byte AL, 0x1
JE near DebugStub_ComReadAL_Wait
mov word DX, 0x0
Call DebugStub_ReadRegister
DebugStub_ComReadAL_Exit:
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ComReadAL_Exit
Ret
DebugStub_ComWrite8:
mov word DX, 0x5
DebugStub_ComWrite8_Wait:
Call DebugStub_ReadRegister
test byte AL, 0x20
JE near DebugStub_ComWrite8_Wait
mov word DX, 0x0
mov byte AL, [ESI]
Call DebugStub_WriteRegister
inc dword ESI
DebugStub_ComWrite8_Exit:
mov dword [static_field__A1Cosmos_Core_INTs_mLastKnownAddress], DebugStub_ComWrite8_Exit
Ret
%endif