| Index | Manual | Download | Source | Macros | Embedded word Case ins.
Sitemap | Links | Forum | Tests | Projects

# Test t8352: OMF object module for 16bit DOS links OMF modules

Source & expected listing t8352.htm.lst
  `| | EUROASM AUTOSEGMENT=ON,CPU=086,DUMPWIDTH=24 |7438333532 |%test %SET t8352 ; OMF.D16 links OMF.D16 |00000000: | | |;; Create the first auxilliary OMF module "%test.WB.obj". | |%test.WB PROGRAM FORMAT=OMF,WIDTH=16,MODEL=SMALL | |;; |[CODE] ::::Section changed. |0000: |Write.D16:: PROC ; Display ASCIIZ string pointed to by DS:SI using DOS. |0000:B402 | MOV AH,02h ; DOS service Teletype output. |0002:8A14 |.1:MOV DL,[SI] ; Load a character from string to DL, increment SI. |0004:80FA00 | CMP DL,0 ; Test if zero-terminator reached. |0007:7405 | JE .9: ; Exit the procedure if AL=0. |0009:CD21 | INT 21h ; Otherwise display the character DL and advance screen cursor. |000B:46 | INC SI ; Let DS:SI point to the next character. |000C:EBF4 | JMP .1: ; Repeat with following characters. |000E:C3 |.9:RET ; AX,BX,SI are clobbered. |000F: | ENDP Write.D16:: | |;; |000F: |Beep.D16:: PROC ; Display message "Beeping.." and play a sound using BIOS. |000F:BE[0000] | MOV SI,=B"Beeping..." ; Define a literal string. Assume DS=PARA# [RODATA}. |0012:E8EBFF | CALL Write.D16:: ; Display the notification "Beeping...". |0015:BE[0000] | MOV SI,=W(0x0007) ; Define ASCIIZ string with BEL character in [RODATA]. |0018:E8E5FF | CALL Write.D16:: ; Play the beep sound. |001B:C3 | RET ; AX,BX,SI are clobbered. |001C: | ENDP Beep.D16:: |[@LT2] ====ListLiterals in section [@LT2]. |0000:0700 =W(0x0007) |[@LT1] ====ListLiterals in section [@LT1]. |0000:42656570696E672E~=B"Beeping..." | | ENDPROGRAM %test.WB | **** ListMap "t8352.WB.obj",model=SMALL,groups=2,segments=2,entry=,stack= | [CGROUP],FA=0000008Eh,RVA=00000000h,size=0000001Ch=28,group [CODE] | [CODE],FA=0000008Eh,RVA=00000000h,size=0000001Ch=28,width=16,align=0010h,purpose=CODE | [DGROUP],FA=000000BFh,RVA=00000000h,size=0000000Dh=13,group [RODATA] | [RODATA],FA=000000BFh,RVA=00000000h,size=0000000Dh=13,width=16,align=0010h,purpose=RODATA+LITERAL | **** ListGlobals "t8352.WB.obj",Global=0,Public=2,Extern=0,eXport=0,Import=0 | Beep.D16,[CGROUP]:0000000Fh,scope='P' | Write.D16,[CGROUP]:00000000h,scope='P' | |;; | |;; Create the second auxilliary OMF module "%test.EX.obj". | |%test.EX PROGRAM FORMAT=OMF,WIDTH=16,MODEL=SMALL |[CODE] ::::Section changed. |0000: |Exit.D16:: PROC ; Display message "End", terminate Terminate the program. |0000:BE[0000] | MOV SI,.M: ; String "End" will be defined in segment [BSS] at DS:SI. |0003:C704456E | MOVW [SI+0],"En" ; Dynamically initialize the notification string. |0007:C744026420 | MOVW [SI+2],"d " ; Assume DS=PARA# [BSS]. |000C:C744040A0D | MOVW [SI+4],0x0D0A ; CR+LF. |0011:C6440600 | MOVB [SI+6],0 ; Zero-terminate the notification. |0015:E8(0000) | CALL Write.D16:: ; Display notification "End". |0018:B44C | MOV AH,4Ch ; DOS function EXIT. |001A:CD21 | INT 21h ; Terminate program and return to DOS. |[BSS] ::::Section changed. |0000:.............. |.M:DB 7*BYTE ; Reserve space for ASCIIZ string "End" in [BSS] segment. |[CODE] ::::Section changed. |001C: | ENDP Exit.D16:: | | ENDPROGRAM %test.EX | **** ListMap "t8352.EX.obj",model=SMALL,groups=2,segments=2,entry=,stack= | [CGROUP],FA=00000087h,RVA=00000000h,size=0000001Ch=28,group [CODE] | [CODE],FA=00000087h,RVA=00000000h,size=0000001Ch=28,width=16,align=0010h,purpose=CODE | [DGROUP],FA=00000000h,RVA=00000000h,size=00000007h=7,group [BSS] | [BSS],FA=00000000h,RVA=00000000h,size=00000007h=7,width=16,align=0010h,purpose=BSS | **** ListGlobals "t8352.EX.obj",Global=0,Public=1,Extern=1,eXport=0,Import=0 | Exit.D16,[CGROUP]:00000000h,scope='P' | Write.D16,[Write.D16]:00000000h,scope='E' | |;; | |;; Create the main OMF module "%test.obj" from two auxilliary OMF modules. | |%test PROGRAM FORMAT=OMF,WIDTH=16,MODEL=SMALL | | LINK %test.WB.obj, %test.EX.obj |[DATA] ::::Section changed. |0000:313662697420534D~|Msg::DB '%^WIDTH[]bit %^MODEL %^FORMAT program "%^OUTFILE".',13,10,0 | | ENDPROGRAM %test |# I0560 Linking OMF module "./t8352.WB.obj". |# I0560 Linking OMF module "./t8352.EX.obj". | **** ListMap "t8352.obj",model=SMALL,groups=2,segments=4,entry=,stack= | [CGROUP],FA=000000CBh,RVA=00000000h,size=0000003Ch=60,group [CODE] | [CODE],FA=000000CBh,RVA=00000000h,size=0000003Ch=60,width=16,align=0010h,purpose=CODE | [DGROUP],FA=00000000h,RVA=00000000h,size=00000027h=39,group [RODATA] [DATA] [BSS] | [RODATA],FA=00000120h,RVA=00000000h,size=0000000Dh=13,width=16,align=0010h,purpose=RODATA | [DATA],FA=00000134h,RVA=00000000h,size=00000027h=39,width=16,align=0010h,purpose=DATA | [BSS],FA=00000000h,RVA=00000000h,size=00000007h=7,width=16,align=0010h,purpose=BSS | **** ListGlobals "t8352.obj",Global=0,Public=4,Extern=0,eXport=0,Import=0 | Beep.D16,[CGROUP]:0000000Fh,scope='P' | Exit.D16,[CGROUP]:00000020h,scope='P' | Msg,[DGROUP]:00000000h,scope='P' | Write.D16,[CGROUP]:00000000h,scope='P'`

Expected messages t8352.out
  `I0180 Assembling source file "t8352.htm". I0270 Assembling source "t8352". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t8352.WB". "t8352.htm"{45} I0510 Assembling program pass 1. "t8352.htm"{45} I0510 Assembling program pass 2. "t8352.htm"{45} I0530 Assembling program pass 3 - final. "t8352.htm"{45} I0660 16bit SMALL OMF file "t8352.WB.obj" created, size=216. "t8352.htm"{70} I0650 Program "t8352.WB" assembled in 3 passes with errorlevel 0. "t8352.htm"{70} I0470 Assembling program "t8352.EX". "t8352.htm"{81} I0510 Assembling program pass 1. "t8352.htm"{81} I0510 Assembling program pass 2. "t8352.htm"{81} I0530 Assembling program pass 3 - final. "t8352.htm"{81} I0660 16bit SMALL OMF file "t8352.EX.obj" created, size=187. "t8352.htm"{96} I0650 Program "t8352.EX" assembled in 3 passes with errorlevel 0. "t8352.htm"{96} I0470 Assembling program "t8352". "t8352.htm"{107} I0510 Assembling program pass 1. "t8352.htm"{107} I0510 Assembling program pass 2. "t8352.htm"{107} I0530 Assembling program pass 3 - final. "t8352.htm"{107} I0560 Linking OMF module "./t8352.WB.obj". "t8352.htm"{111} I0560 Linking OMF module "./t8352.EX.obj". "t8352.htm"{111} I0660 16bit SMALL OMF file "t8352.obj" created, size=359. "t8352.htm"{111} I0650 Program "t8352" assembled in 3 passes with errorlevel 0. "t8352.htm"{111} I0750 Source "t8352" (185 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t8352.htm.lst" created, size=6130. I0990 EuroAssembler terminated with errorlevel 0.`

Expected output file t8352. obj

      0000: 80 07 00 05 74 38 33 35 32 2E 88 10 00 00 00 45  ¤·°·t8352.¤·°°°E
      0010: 75 72 6F 41 73 73 65 6D 62 6C 65 72 2F 88 05 00  uroAssembler/¤·°
      0020: 00 9D 30 73 33 96 25 00 00 06 43 47 52 4F 55 50  °¤0s3¤%°°·CGROUP
      0030: 04 43 4F 44 45 06 44 47 52 4F 55 50 06 52 4F 44  ·CODE·DGROUP·ROD
      0040: 41 54 41 04 44 41 54 41 03 42 53 53 AF 98 07 00  ATA·DATA·BSS¤¤·°
      0050: 68 3C 00 03 01 00 B9 98 07 00 68 0D 00 05 01 00  h<°··°¤¤·°h·°··°
      0060: E6 98 07 00 68 27 00 06 01 00 CB 98 07 00 68 07  ¤¤·°h'°··°¤¤·°h·
      0070: 00 07 01 00 EA 9A 04 00 02 FF 01 60 9A 08 00 04  °··°¤¤·°·¤·`¤·°·
      0080: FF 03 FF 02 FF 04 54 90 0A 00 00 03 03 4D 73 67  ¤·¤·¤·T¤¬°°··Msg
      0090: 00 00 00 39 90 10 00 00 01 09 57 72 69 74 65 2E  °°°9¤·°°··Write.
      00A0: 44 31 36 00 00 00 72 90 0F 00 00 01 08 42 65 65  D16°°°r¤·°°··Bee
      00B0: 70 2E 44 31 36 0F 00 00 F4 90 0F 00 00 01 08 45  p.D16·°°¤¤·°°··E
      00C0: 78 69 74 2E 44 31 36 20 00 00 C5 A0 40 00 01 00  xit.D16¯°°¤¤@°·°
      00D0: 00 B4 02 8A 14 80 FA 00 74 05 CD 21 46 EB F4 C3  °¤·¤·¤¤°t·¤!F¤¤¤
      00E0: BE 00 00 E8 EB FF BE 00 00 E8 E5 FF C3 90 90 90  ¤°°¤¤¤¤°°¤¤¤¤¤¤¤
      00F0: 90 BE 00 00 C7 04 45 6E C7 44 02 64 20 C7 44 04  ¤¤°°¤·En¤D·d¯¤D·
      0100: 0A 0D C6 44 06 00 E8 C8 FF B4 4C CD 21 45 9C 0F  ¬·¤D·°¤¤¤¤L¤!E¤·
      0110: 00 C4 10 50 02 02 00 C4 16 54 02 C4 21 54 04 C0  °¤·P··°¤·T·¤!T·¤
      0120: A0 11 00 02 00 00 07 00 42 65 65 70 69 6E 67 2E  ¤·°·°°·°Beeping.
      0130: 2E 2E 00 02 A0 2B 00 03 00 00 31 36 62 69 74 20  ..°·¤+°·°°16bit¯
      0140: 53 4D 41 4C 4C 20 4F 4D 46 20 70 72 6F 67 72 61  SMALL¯OMF¯progra
      0150: 6D 20 22 74 38 33 35 32 2E 6F 62 6A 22 2E 0D 0A  m¯"t8352.obj".·¬
      0160: 00 81 8A 02 00 00 74                             °¤¤·°°t

▲Back to the top▲