EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t9069: LIBCOF library for 16bit DOS links LIBCOF library


Source & expected listing t9069.htm.lst
| | EUROASM AUTOSEGMENT=ON,CPU=086,DUMPWIDTH=24 |7439303639 |%test %SET t9069 ; LIBOMF.D16 links LIBCOF.D16 |00000000: | | |;; Create the first auxilliary COFF module "%test.WB.obj". | |%test.WB PROGRAM FORMAT=COFF,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 "t9069.WB.obj",model=SMALL,groups=2,segments=2,entry=,stack= | [CGROUP],FA=00000064h,RVA=00000000h,size=0000001Ch=28,group [CODE] | [CODE],FA=00000064h,RVA=00000000h,size=0000001Ch=28,width=16,align=0010h,purpose=CODE | [DGROUP],FA=00000094h,RVA=00000000h,size=0000000Dh=13,group [RODATA] | [RODATA],FA=00000094h,RVA=00000000h,size=0000000Dh=13,width=16,align=0010h,purpose=RODATA+LITERAL | **** ListGlobals "t9069.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 COFF module "%test.EX.obj". | |%test.EX PROGRAM FORMAT=COFF,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 "t9069.EX.obj",model=SMALL,groups=2,segments=2,entry=,stack= | [CGROUP],FA=00000064h,RVA=00000000h,size=0000001Ch=28,group [CODE] | [CODE],FA=00000064h,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 "t9069.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 auxilliary LIBCOF library "%test.libcof.lib". | |%test.libcof PROGRAM FORMAT=LIBCOF,WIDTH=16,MODEL=SMALL | | LINK %test.WB.obj, %test.EX.obj | | ENDPROGRAM %test.libcof |# I0560 Linking COFF module ".\t9069.WB.obj". |# I0560 Linking COFF module ".\t9069.EX.obj". | **** ListMap "t9069.libcof.lib",model=SMALL,groups=0,segments=0,entry=,stack= | **** ListGlobals "t9069.libcof.lib",Global=0,Public=0,Extern=0,eXport=0,Import=0 | |;; | |;; Create the main LIBCOF library "%test.lib" from the LIBCOF library. | |%test PROGRAM FORMAT=LIBCOF,WIDTH=16,MODEL=SMALL | | GLOBAL Write.D16, Beep.D16, Exit.D16 | | LINK %test.libcof.lib |[DATA] ::::Section changed. |0000:313662697420534D~|Msg::DB '%^WIDTH[]bit %^MODEL %^FORMAT program "%^OUTFILE".',13,10,0 | | ENDPROGRAM %test |# I0561 Linking LIBCOF library ".\t9069.libcof.lib". | **** ListMap "t9069.lib",model=SMALL,groups=1,segments=1,entry=,stack= | [DGROUP],FA=0000003Ch,RVA=00000000h,size=0000002Ah=42,group [DATA] | [DATA],FA=0000003Ch,RVA=00000000h,size=0000002Ah=42,width=16,align=0010h,purpose=DATA | **** ListGlobals "t9069.lib",Global=0,Public=1,Extern=3,eXport=0,Import=0 | Beep.D16,[Beep.D16]:00000000h,scope='E' | Exit.D16,[Exit.D16]:00000000h,scope='E' | Msg,[DGROUP]:00000000h,scope='P' | Write.D16,[Write.D16]:00000000h,scope='E'
Expected messages t9069.out
I0180 Assembling source file "t9069.htm". I0270 Assembling source "t9069". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t9069.WB". "t9069.htm"{45} I0510 Assembling program pass 1. "t9069.htm"{45} I0510 Assembling program pass 2. "t9069.htm"{45} I0530 Assembling program pass 3 - final. "t9069.htm"{45} I0660 16bit SMALL COFF file "t9069.WB.obj" created, size=478. "t9069.htm"{70} I0650 Program "t9069.WB" assembled in 3 passes with errorlevel 0. "t9069.htm"{70} I0470 Assembling program "t9069.EX". "t9069.htm"{81} I0510 Assembling program pass 1. "t9069.htm"{81} I0510 Assembling program pass 2. "t9069.htm"{81} I0530 Assembling program pass 3 - final. "t9069.htm"{81} I0660 16bit SMALL COFF file "t9069.EX.obj" created, size=335. "t9069.htm"{96} I0650 Program "t9069.EX" assembled in 3 passes with errorlevel 0. "t9069.htm"{96} I0470 Assembling program "t9069.libcof". "t9069.htm"{107} I0510 Assembling program pass 1. "t9069.htm"{107} I0530 Assembling program pass 2 - final. "t9069.htm"{107} I0560 Linking COFF module ".\t9069.WB.obj". "t9069.htm"{109} I0560 Linking COFF module ".\t9069.EX.obj". "t9069.htm"{109} I0660 16bit SMALL LIBCOF file "t9069.libcof.lib" created, size=1285. "t9069.htm"{109} I0650 Program "t9069.libcof" assembled in 2 passes with errorlevel 0. "t9069.htm"{109} I0470 Assembling program "t9069". "t9069.htm"{116} I0510 Assembling program pass 1. "t9069.htm"{116} I0510 Assembling program pass 2. "t9069.htm"{116} I0530 Assembling program pass 3 - final. "t9069.htm"{116} I0561 Linking LIBCOF library ".\t9069.libcof.lib". "t9069.htm"{121} I0660 16bit SMALL LIBCOF file "t9069.lib" created, size=1659. "t9069.htm"{121} I0650 Program "t9069" assembled in 3 passes with errorlevel 0. "t9069.htm"{121} I0750 Source "t9069" (277 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t9069.htm.lst" created, size=6350. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t9069. lib
0000: 21 3C 61 72 63 68 3E 0A 2F 20 20 20 20 20 20 20  !<arch>¬/¯¯¯¯¯¯¯
0010: 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20  ¯¯¯¯¯¯¯¯0¯¯¯¯¯¯¯
0020: 20 20 20 20 30 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯0¯¯¯¯¯0¯¯¯¯¯
0030: 31 30 30 36 36 36 20 20 31 31 30 20 20 20 20 20  100666¯¯110¯¯¯¯¯
0040: 20 20 60 0A 00 00 00 0A 00 00 01 96 00 00 01 96  ¯¯`¬°°°¬°°·¤°°·¤
0050: 00 00 01 96 00 00 02 D6 00 00 02 D6 00 00 02 D6  °°·¤°°·¤°°·¤°°·¤
0060: 00 00 02 D6 00 00 04 F0 00 00 04 F0 00 00 04 F0  °°·¤°°·¤°°·¤°°·¤
0070: 44 47 52 4F 55 50 00 44 41 54 41 00 4D 73 67 00  DGROUP°DATA°Msg°
0080: 43 4F 44 45 00 52 4F 44 41 54 41 00 42 65 65 70  CODE°RODATA°Beep
0090: 2E 44 31 36 00 57 72 69 74 65 2E 44 31 36 00 43  .D16°Write.D16°C
00A0: 4F 44 45 00 42 53 53 00 45 78 69 74 2E 44 31 36  ODE°BSS°Exit.D16
00B0: 00 0A 2F 20 20 20 20 20 20 20 20 20 20 20 20 20  °¬/¯¯¯¯¯¯¯¯¯¯¯¯¯
00C0: 20 20 30 20 20 20 20 20 20 20 20 20 20 20 30 20  ¯¯0¯¯¯¯¯¯¯¯¯¯¯0¯
00D0: 20 20 20 20 30 20 20 20 20 20 31 30 30 36 36 36  ¯¯¯¯0¯¯¯¯¯100666
00E0: 20 20 31 30 36 20 20 20 20 20 20 20 60 0A 03 00  ¯¯106¯¯¯¯¯¯¯`¬·°
00F0: 00 00 96 01 00 00 D6 02 00 00 F0 04 00 00 0A 00  °°¤·°°¤·°°¤·°°¬°
0100: 00 00 03 00 02 00 03 00 02 00 01 00 01 00 03 00  °°·°·°·°·°·°·°·°
0110: 01 00 02 00 02 00 42 53 53 00 42 65 65 70 2E 44  ·°·°·°BSS°Beep.D
0120: 31 36 00 43 4F 44 45 00 43 4F 44 45 00 44 41 54  16°CODE°CODE°DAT
0130: 41 00 44 47 52 4F 55 50 00 45 78 69 74 2E 44 31  A°DGROUP°Exit.D1
0140: 36 00 4D 73 67 00 52 4F 44 41 54 41 00 57 72 69  6°Msg°RODATA°Wri
0150: 74 65 2E 44 31 36 00 0A 2F 2F 20 20 20 20 20 20  te.D16°¬//¯¯¯¯¯¯
0160: 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20  ¯¯¯¯¯¯¯¯0¯¯¯¯¯¯¯
0170: 20 20 20 20 30 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯0¯¯¯¯¯0¯¯¯¯¯
0180: 31 30 30 36 36 36 20 20 32 20 20 20 20 20 20 20  100666¯¯2¯¯¯¯¯¯¯
0190: 20 20 60 0A 00 0A 74 39 30 36 39 2F 20 20 20 20  ¯¯`¬°¬t9069/¯¯¯¯
01A0: 20 20 20 20 20 20 30 20 20 20 20 20 20 20 20 20  ¯¯¯¯¯¯0¯¯¯¯¯¯¯¯¯
01B0: 20 20 30 20 20 20 20 20 30 20 20 20 20 20 31 30  ¯¯0¯¯¯¯¯0¯¯¯¯¯10
01C0: 30 36 36 36 20 20 32 36 30 20 20 20 20 20 20 20  0666¯¯260¯¯¯¯¯¯¯
01D0: 60 0A 4C 01 01 00 00 00 00 00 66 00 00 00 08 00  `¬L··°°°°°f°°°·°
01E0: 00 00 00 00 00 00 44 41 54 41 00 00 00 00 00 00  °°°°°°DATA°°°°°°
01F0: 00 00 00 00 00 00 2A 00 00 00 3C 00 00 00 00 00  °°°°°°*°°°<°°°°°
0200: 00 00 00 00 00 00 00 00 00 00 40 00 50 C0 31 36  °°°°°°°°°°@°P¤16
0210: 62 69 74 20 53 4D 41 4C 4C 20 4C 49 42 43 4F 46  bit¯SMALL¯LIBCOF
0220: 20 70 72 6F 67 72 61 6D 20 22 74 39 30 36 39 2E  ¯program¯"t9069.
0230: 6C 69 62 22 2E 0D 0A 00 2E 66 69 6C 65 00 00 00  lib".·¬°.file°°°
0240: 00 00 00 00 FE FF 00 00 67 01 74 39 30 36 39 2E  °°°°¤¤°°g·t9069.
0250: 68 74 6D 00 00 00 00 00 00 00 00 00 44 41 54 41  htm°°°°°°°°°DATA
0260: 00 00 00 00 00 00 00 00 01 00 00 00 03 01 2A 00  °°°°°°°°·°°°··*°
0270: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0280: 42 65 65 70 2E 44 31 36 00 00 00 00 00 00 01 01  Beep.D16°°°°°°··
0290: 02 00 45 78 69 74 2E 44 31 36 00 00 00 00 00 00  ·°Exit.D16°°°°°°
02A0: 01 01 02 00 4D 73 67 00 00 00 00 00 00 00 00 00  ···°Msg°°°°°°°°°
02B0: 01 00 0C 00 02 00 00 00 00 00 04 00 00 00 00 00  ·°·°·°°°°°·°°°°°
02C0: 00 00 00 00 01 01 02 00 0E 00 00 00 57 72 69 74  °°°°···°·°°°Writ
02D0: 65 2E 44 31 36 00 74 39 30 36 39 2E 57 42 2F 20  e.D16°t9069.WB/¯
02E0: 20 20 20 20 20 20 30 20 20 20 20 20 20 20 20 20  ¯¯¯¯¯¯0¯¯¯¯¯¯¯¯¯
02F0: 20 20 30 20 20 20 20 20 30 20 20 20 20 20 31 30  ¯¯0¯¯¯¯¯0¯¯¯¯¯10
0300: 30 36 36 36 20 20 34 37 38 20 20 20 20 20 20 20  0666¯¯478¯¯¯¯¯¯¯
0310: 60 0A 4C 01 02 00 00 00 00 00 A2 00 00 00 0E 00  `¬L··°°°°°¤°°°·°
0320: 00 00 00 00 00 00 43 4F 44 45 00 00 00 00 00 00  °°°°°°CODE°°°°°°
0330: 00 00 00 00 00 00 1C 00 00 00 64 00 00 00 80 00  °°°°°°·°°°d°°°¤°
0340: 00 00 00 00 00 00 02 00 00 00 20 00 50 60 52 4F  °°°°°°·°°°¯°P`RO
0350: 44 41 54 41 00 00 00 00 00 00 00 00 00 00 0D 00  DATA°°°°°°°°°°·°
0360: 00 00 94 00 00 00 00 00 00 00 00 00 00 00 00 00  °°¤°°°°°°°°°°°°°
0370: 00 00 40 00 50 40 B4 02 8A 14 80 FA 00 74 05 CD  °°@°P@¤·¤·¤¤°t·¤
0380: 21 46 EB F4 C3 BE 02 00 E8 EB FF BE 00 00 E8 E5  !F¤¤¤¤·°¤¤¤¤°°¤¤
0390: FF C3 10 00 00 00 04 00 00 00 01 00 16 00 00 00  ¤¤·°°°·°°°·°·°°°
03A0: 04 00 00 00 01 00 07 00 42 65 65 70 69 6E 67 2E  ·°°°·°·°Beeping.
03B0: 2E 2E 00 00 2E 66 69 6C 65 00 00 00 00 00 00 00  ..°°.file°°°°°°°
03C0: FE FF 00 00 67 01 74 39 30 36 39 2E 68 74 6D 00  ¤¤°°g·t9069.htm°
03D0: 00 00 00 00 00 00 00 00 43 4F 44 45 00 00 00 00  °°°°°°°°CODE°°°°
03E0: 00 00 00 00 01 00 00 00 03 01 1C 00 00 00 02 00  °°°°·°°°···°°°·°
03F0: 00 00 00 00 00 00 00 00 00 00 00 00 52 4F 44 41  °°°°°°°°°°°°RODA
0400: 54 41 00 00 00 00 00 00 02 00 00 00 03 01 0D 00  TA°°°°°°·°°°···°
0410: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0420: 00 00 00 00 04 00 00 00 02 00 00 00 02 00 0C 00  °°°°·°°°·°°°·°·°
0430: 03 00 00 00 00 00 13 00 00 00 00 00 00 00 02 00  ·°°°°°·°°°°°°°·°
0440: 0D 00 03 00 40 4C 54 31 00 00 00 00 02 00 00 00  ·°·°@LT1°°°°·°°°
0450: 02 00 01 01 03 00 40 4C 54 32 00 00 00 00 00 00  ·°···°@LT2°°°°°°
0460: 00 00 02 00 01 01 03 00 00 00 00 00 1E 00 00 00  °°·°···°°°°°·°°°
0470: 02 00 00 00 01 00 01 01 03 00 00 00 00 00 2A 00  ·°°°·°···°°°°°*°
0480: 00 00 0E 00 00 00 01 00 01 01 03 00 42 65 65 70  °°·°°°·°···°Beep
0490: 2E 44 31 36 0F 00 00 00 01 00 01 02 02 00 00 00  .D16·°°°·°···°°°
04A0: 00 00 36 00 00 00 00 00 00 00 01 00 01 02 02 00  °°6°°°°°°°·°···°
04B0: 40 00 00 00 3D 42 22 42 65 65 70 69 6E 67 2E 2E  @°°°=B"Beeping..
04C0: 2E 22 00 3D 57 28 30 78 30 30 30 37 29 00 57 72  ."°=W(0x0007)°Wr
04D0: 69 74 65 2E 44 31 36 2E 31 00 57 72 69 74 65 2E  ite.D16.1°Write.
04E0: 44 31 36 2E 39 00 57 72 69 74 65 2E 44 31 36 00  D16.9°Write.D16°
04F0: 74 39 30 36 39 2E 45 58 2F 20 20 20 20 20 20 20  t9069.EX/¯¯¯¯¯¯¯
0500: 30 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20  0¯¯¯¯¯¯¯¯¯¯¯0¯¯¯
0510: 20 20 30 20 20 20 20 20 31 30 30 36 36 36 20 20  ¯¯0¯¯¯¯¯100666¯¯
0520: 33 33 35 20 20 20 20 20 20 20 60 0A 4C 01 02 00  335¯¯¯¯¯¯¯`¬L··°
0530: 00 00 00 00 94 00 00 00 09 00 00 00 00 00 00 00  °°°°¤°°°·°°°°°°°
0540: 43 4F 44 45 00 00 00 00 00 00 00 00 00 00 00 00  CODE°°°°°°°°°°°°
0550: 1C 00 00 00 64 00 00 00 80 00 00 00 00 00 00 00  ·°°°d°°°¤°°°°°°°
0560: 02 00 00 00 20 00 50 60 42 53 53 00 00 00 00 00  ·°°°¯°P`BSS°°°°°
0570: 00 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00  °°°°°°°°·°°°°°°°
0580: 00 00 00 00 00 00 00 00 00 00 00 00 80 00 50 C0  °°°°°°°°°°°°¤°P¤
0590: BE 00 00 C7 04 45 6E C7 44 02 64 20 C7 44 04 0A  ¤°°¤·En¤D·d¯¤D·¬
05A0: 0D C6 44 06 00 E8 00 00 B4 4C CD 21 01 00 00 00  ·¤D·°¤°°¤L¤!·°°°
05B0: 02 00 00 00 01 00 16 00 00 00 08 00 00 00 02 00  ·°°°·°·°°°·°°°·°
05C0: 2E 66 69 6C 65 00 00 00 00 00 00 00 FE FF 00 00  .file°°°°°°°¤¤°°
05D0: 67 01 74 39 30 36 39 2E 68 74 6D 00 00 00 00 00  g·t9069.htm°°°°°
05E0: 00 00 00 00 42 53 53 00 00 00 00 00 00 00 00 00  °°°°BSS°°°°°°°°°
05F0: 02 00 00 00 03 01 00 00 00 00 00 00 00 00 00 00  ·°°°··°°°°°°°°°°
0600: 00 00 00 00 00 00 00 00 43 4F 44 45 00 00 00 00  °°°°°°°°CODE°°°°
0610: 00 00 00 00 01 00 00 00 03 01 1C 00 00 00 02 00  °°°°·°°°···°°°·°
0620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  °°°°°°°°°°°°°°°°
0630: 04 00 00 00 00 00 00 00 02 00 0C 00 03 00 45 78  ·°°°°°°°·°·°·°Ex
0640: 69 74 2E 44 31 36 00 00 00 00 01 00 01 02 02 00  it.D16°°°°·°···°
0650: 00 00 00 00 0F 00 00 00 00 00 00 00 00 00 01 01  °°°°·°°°°°°°°°··
0660: 02 00 19 00 00 00 45 78 69 74 2E 44 31 36 2E 4D  ·°·°°°Exit.D16.M
0670: 00 57 72 69 74 65 2E 44 31 36 00                 °Write.D16°

▲Back to the top▲