-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmzstub.asm
53 lines (39 loc) · 885 Bytes
/
mzstub.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
;
; @project: sunrise (2011)
; @author: Vitaliy Krutko (aka asmforce)
; @email: asmforce@ukr.net asmxforce@gmail.com
; @target: pe ms-dos stub
; @initialization: 30.08.2011
; @last-change: 30.08.2011
; @original-filename: mzstub.asm
;
%include "org.asm"
%include "config.asm"
org( mzhead, MZ_HEAD_ORG, 0x00 )
dw MZ_SIGNATURE
dw MZ_LAST_PAGE_SIZE
dw MZ_PAGE_COUNT
dw MZ_RELOCATION_ENTRIES
dw (MZ_HEAD_SIZE/MZ_PARAGRAPH_SIZE)
dw MZ_MIN_ALLOCATE
dw MZ_MAX_ALLOCATE
dw MZ_SS, MZ_SP
dw MZ_CHECKSUM
dw MZ_IP, MZ_CS
dw MZ_RELOCATION_TABLE_ORG
dw MZ_OVERLAY_COUNT
dw 0, 0 ; reserved
org( mzcode, MZ_CODE_ORG, 0x00 )
; push cs
; pop ds
; mov dx, message-mzcode
; mov ah, 0x09
; int 0x21
mov ax, 0x4C01
int 0x21
org( PE_HLRECORD_ORG, 0x00 )
dd PE_HEAD_ORG
;message:
; db MZ_ERROR_MESSAGE, 0x0D, 0x0A, 0x24
org( pehead, PE_HEAD_ORG, 0x00 )
dd PE_SIGNATURE