Last active
August 29, 2015 14:12
-
-
Save yunchih/a432236fe3ec2f31701e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; What does "BP.DEVNUM" mean? | |
DPBLOCK STRUC | |
DEVNUM DB ? ;I/O driver number | |
DPBLOCK ENDS | |
MOV AH,[BP.DEVNUM] | |
;------------------- | |
; We see this pattern many times : | |
; SegmentRegister : [ PointerRegister.NAME ] | |
; PointerRegister includes: BP , SP , DI , SI | |
; What does this pattern mean? | |
ADD AX,ES:[BP.DIRSEC] | |
;------------------- | |
; Does " SEGBIOS SEGMENT AT BIOSSEG " mean | |
; " The following declarations should be written at BIOSSEG" ? | |
; What does " ORG 0 " do? | |
; Line 175 | |
BIOSSEG EQU 60H | |
SEGBIOS SEGMENT AT BIOSSEG | |
ORG 0 | |
DB 3 DUP (?) ;Reserve room for jump to init code | |
BIOSSTAT DB 3 DUP (?) ;Console input status check | |
BIOSIN DB 3 DUP (?) ;Get console character | |
SEGBIOS ENDS | |
;------------------- | |
; On line 148, we see the following code | |
; This seems to imply the overall structure of the entire source | |
; But is it necessary? Can the assembler write data first, and then code? | |
; ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ | |
;The following are all of the segments used | |
;They are declared in the order that they should be placed in the executable | |
CODE SEGMENT | |
CODE ENDS | |
CONSTANTS SEGMENT BYTE | |
CONSTANTS ENDS | |
DATA SEGMENT WORD | |
DATA ENDS | |
DOSGROUP GROUP CODE,CONSTANTS,DATA | |
SEGBIOS SEGMENT | |
SEGBIOS ENDS | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment