0% found this document useful (0 votes)
9 views3 pages

Exp3 & 4 - 2025 - Machine - Code

The document contains the generated assembly listing and EXE header for two programs compiled using the EMU8086 assembler. The first program initializes data and performs arithmetic operations, while the second program manipulates registers with bitwise operations. Each program's EXE header details the structure and memory requirements of the executable files.

Uploaded by

rihem45321
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Exp3 & 4 - 2025 - Machine - Code

The document contains the generated assembly listing and EXE header for two programs compiled using the EMU8086 assembler. The first program initializes data and performs arithmetic operations, while the second program manipulates registers with bitwise operations. Each program's EXE header details the structure and memory requirements of the executable files.

Uploaded by

rihem45321
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

EMU8086 GENERATED LISTING. MACHINE CODE <- SOURCE.

exp3_2025.exe -- emu8086 assembler version: 4.08

[ 1/4/2025 -- 10:08:57 PM ]

===================================================================================
================
[LINE] LOC: MACHINE CODE SOURCE
===================================================================================
================

[ 1] : .MODEL SMALL
[ 2] : .DATA
[ 3] : .CODE
[ 4] 0000: B8 10 00 MOV AX, 0010H
[ 5] 0003: 8E D8 MOV DS, AX
[ 6] 0005: BE 04 20 MOV SI, 2004H
[ 7] 0008: C7 04 66 65 MOV [SI], 6566H
[ 8] 000C: 8B 04 MOV AX, [SI]
[ 9] 000E: 46 INC SI
[ 10] 000F: 46 INC SI
[ 11] 0010: C7 04 76 88 MOV [SI], 8876H
[ 12] 0014: 03 04 ADD AX, [SI]
[ 13] 0016: 46 INC SI
[ 14] 0017: 46 INC SI
[ 15] 0018: C7 04 55 77 MOV [SI],7755H
[ 16] 001C: 13 04 ADC AX, [SI]
[ 17] 001E: 46 INC SI
[ 18] 001F: 46 INC SI
[ 19] 0020: C7 04 66 55 MOV [SI], 5566H
[ 20] 0024: 13 04 ADC AX, [SI]
[ 21] 0026: 46 INC SI
[ 22] 0027: 46 INC SI
[ 23] 0028: C7 04 77 66 MOV [SI], 6677H
[ 24] 002C: 13 04 ADC AX, [SI]
[ 25] 002E: BA 00 01 MOV DX, 0100H
[ 26] 0031: 8E C2 MOV ES, DX
[ 27] 0033: BF 05 20 MOV DI, 2005H

[ 28] 0036: 89 05 MOV [DI], AX


[ 29] : END
[ 30] :

===================================================================================
================

EXE HEADER - bytes from 0000 to 01FF inclusive.

0000: 4D - exe signature (M)


0001: 5A - exe signature (Z)
0002: 38 - bytes on last page (l.byte)
0003: 00 - bytes on last page (h.byte)
0004: 02 - 512 byte pages in file (l.byte)
0005: 00 - 512 byte pages in file (h.byte)
0006: 00 - relocations (l.byte)
0007: 00 - relocations (h.byte)
0008: 20 - paragraphs in header (l.byte)
0009: 00 - paragraphs in header (h.byte)
000A: 00 - minimum memory (l.byte)
000B: 00 - minimum memory (h.byte)
000C: FF - maximum memory (l.byte)
000D: FF - maximum memory (h.byte)
000E: 00 - SS - stack segment (l.byte)
000F: 00 - SS - stack segment (h.byte)
0010: 00 - SP - stack pointer (l.byte)
0011: 00 - SP - stack pointer (h.byte)
0012: CB - check sum (l.byte)
0013: 4C - check sum (h.byte)
0014: 00 - IP - instruction pointer (l.byte)
0015: 00 - IP - instruction pointer (h.byte)
0016: 00 - CS - code segment (l.byte)
0017: 00 - CS - code segment (h.byte)
0018: 1E - relocation table adress (l.byte)
0019: 00 - relocation table adress (h.byte)
001A: 00 - overlay number (l.byte)
001B: 00 - overlay number (h.byte)
001C: 01 - signature (l.byte)
001D: 00 - signature (h.byte)
001E to 01FF - reserved relocation area (00)
EMU8086 GENERATED LISTING. MACHINE CODE <- SOURCE.

exp4_2025.exe -- emu8086 assembler version: 4.08

[ 1/4/2025 -- 10:10:29 PM ]

===================================================================================
================
[LINE] LOC: MACHINE CODE SOURCE
===================================================================================
================

[ 1] : .MODEL SMALL
[ 2] : .CODE
[ 3] 0000: B8 BB 55 MOV AX, 55BBH
[ 4] 0003: BB 66 55 MOV BX, 5566H
[ 5] 0006: 24 5B AND AL, 5BH
[ 6] 0008: 80 CC 09 OR AH, 09H
[ 7] 000B: 81 F3 3F 33 XOR BX, 333FH
[ 8] 000F: 33 DB XOR BX, BX
[ 9] : END
[ 10] :

===================================================================================
================

EXE HEADER - bytes from 0000 to 01FF inclusive.

0000: 4D - exe signature (M)


0001: 5A - exe signature (Z)
0002: 11 - bytes on last page (l.byte)
0003: 00 - bytes on last page (h.byte)
0004: 02 - 512 byte pages in file (l.byte)
0005: 00 - 512 byte pages in file (h.byte)
0006: 00 - relocations (l.byte)
0007: 00 - relocations (h.byte)
0008: 20 - paragraphs in header (l.byte)
0009: 00 - paragraphs in header (h.byte)
000A: 00 - minimum memory (l.byte)
000B: 00 - minimum memory (h.byte)
000C: FF - maximum memory (l.byte)
000D: FF - maximum memory (h.byte)
000E: 00 - SS - stack segment (l.byte)
000F: 00 - SS - stack segment (h.byte)
0010: 00 - SP - stack pointer (l.byte)
0011: 00 - SP - stack pointer (h.byte)
0012: 40 - check sum (l.byte)
0013: BC - check sum (h.byte)
0014: 00 - IP - instruction pointer (l.byte)
0015: 00 - IP - instruction pointer (h.byte)
0016: 00 - CS - code segment (l.byte)
0017: 00 - CS - code segment (h.byte)
0018: 1E - relocation table adress (l.byte)
0019: 00 - relocation table adress (h.byte)
001A: 00 - overlay number (l.byte)
001B: 00 - overlay number (h.byte)
001C: 01 - signature (l.byte)
001D: 00 - signature (h.byte)
001E to 01FF - reserved relocation area (00)

You might also like