EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t9057: LIBCOF library for 16bit DOS links LIBOMF library


Source & expected listing t9057.htm.lst
| | EUROASM AUTOSEGMENT=ON,CPU=086,DUMPWIDTH=24 |7439303537 |%test %SET t9057 ; LIBCOF.D16 link LIBOMF.D16 | |;; | |;; Create the auxilliary OMF library "%test.OMF.lib". | |%test.OMF PROGRAM FORMAT=LIBOMF,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:: | |;; |001C: |Exit.D16:: PROC ; Display message "End", terminate Terminate the program. |001C:BE[0000] | MOV SI,.M: ; String "End" will be defined in segment [BSS] at DS:SI. |001F:C704456E | MOVW [SI+0],"En" ; Dynamically initialize the notification string. |0023:C744026420 | MOVW [SI+2],"d " ; Assume DS=PARA# [BSS]. |0028:C744040A0D | MOVW [SI+4],0x0D0A ; CR+LF. |002D:C6440600 | MOVB [SI+6],0 ; Zero-terminate the notification. |0031:E8CCFF | CALL Write.D16:: ; Display notification "End". |0034:B44C | MOV AH,4Ch ; DOS function EXIT. |0036: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. |0038: | ENDP Exit.D16:: |[@LT2] ====ListLiterals in section [@LT2]. |0000:0700 =W(0x0007) |[@LT1] ====ListLiterals in section [@LT1]. |0000:42656570696E672E~=B"Beeping..." | | ENDPROGRAM %test.OMF | **** ListMap "t9057.OMF.lib",model=SMALL,groups=2,segments=3,entry=,stack= | [CGROUP],FA=000000C1h,RVA=00000000h,size=00000038h=56,group [CODE] | [CODE],FA=000000C1h,RVA=00000000h,size=00000038h=56,width=16,align=0010h,purpose=CODE | [DGROUP],FA=00000000h,RVA=00000000h,size=0000000Dh=13,group [RODATA] [BSS] | [RODATA],FA=00000112h,RVA=00000000h,size=0000000Dh=13,width=16,align=0010h,purpose=RODATA+LITERAL | [BSS],FA=00000000h,RVA=00000000h,size=00000007h=7,width=16,align=0010h,purpose=BSS | **** ListGlobals "t9057.OMF.lib",Global=0,Public=3,Extern=0,eXport=0,Import=0 | Beep.D16,[CGROUP]:0000000Fh,scope='P' | Exit.D16,[CGROUP]:0000001Ch,scope='P' | Write.D16,[CGROUP]:00000000h,scope='P' | |;; | |;; Create the main LIBCOF library "%test.lib" from auxilliary OMF library. | |%test PROGRAM FORMAT=LIBCOF,WIDTH=16,MODEL=SMALL | | LINK %test.OMF.lib |[DATA] ::::Section changed. |0000:313662697420534D~|Msg::DB '%^WIDTH[]bit %^MODEL %^FORMAT program "%^OUTFILE".',13,10,0 | | ENDPROGRAM %test |# I0561 Linking LIBOMF library ".\t9057.OMF.lib". | **** ListMap "t9057.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 "t9057.lib",Global=0,Public=1,Extern=0,eXport=0,Import=0 | Msg,[DGROUP]:00000000h,scope='P'
Expected messages t9057.out
I0180 Assembling source file "t9057.htm". I0270 Assembling source "t9057". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t9057.OMF". "t9057.htm"{45} I0510 Assembling program pass 1. "t9057.htm"{45} I0510 Assembling program pass 2. "t9057.htm"{45} I0530 Assembling program pass 3 - final. "t9057.htm"{45} I0660 16bit SMALL LIBOMF file "t9057.OMF.lib" created, size=1536. "t9057.htm"{84} I0650 Program "t9057.OMF" assembled in 3 passes with errorlevel 0. "t9057.htm"{84} I0470 Assembling program "t9057". "t9057.htm"{97} I0510 Assembling program pass 1. "t9057.htm"{97} I0510 Assembling program pass 2. "t9057.htm"{97} I0530 Assembling program pass 3 - final. "t9057.htm"{97} I0561 Linking LIBOMF library ".\t9057.OMF.lib". "t9057.htm"{101} I0660 16bit SMALL LIBCOF file "t9057.lib" created, size=1192. "t9057.htm"{101} I0650 Program "t9057" assembled in 3 passes with errorlevel 0. "t9057.htm"{101} I0750 Source "t9057" (212 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t9057.htm.lst" created, size=4839. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t9057. 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 32 32 20 20 20 20 20  100666¯¯122¯¯¯¯¯
0040: 20 20 60 0A 00 00 00 0B 00 00 01 A8 00 00 01 A8  ¯¯`¬°°°·°°·¤°°·¤
0050: 00 00 01 A8 00 00 02 A8 00 00 02 A8 00 00 02 A8  °°·¤°°·¤°°·¤°°·¤
0060: 00 00 02 A8 00 00 02 A8 00 00 02 A8 00 00 02 A8  °°·¤°°·¤°°·¤°°·¤
0070: 00 00 02 A8 44 47 52 4F 55 50 00 44 41 54 41 00  °°·¤DGROUP°DATA°
0080: 4D 73 67 00 43 4F 44 45 00 52 4F 44 41 54 41 00  Msg°CODE°RODATA°
0090: 42 53 53 00 43 47 52 4F 55 50 00 44 47 52 4F 55  BSS°CGROUP°DGROU
00A0: 50 00 57 72 69 74 65 2E 44 31 36 00 42 65 65 70  P°Write.D16°Beep
00B0: 2E 44 31 36 00 45 78 69 74 2E 44 31 36 00 2F 20  .D16°Exit.D16°/¯
00C0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 20  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯0¯
00D0: 20 20 20 20 20 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯¯¯¯¯¯¯0¯¯¯¯¯
00E0: 30 20 20 20 20 20 31 30 30 36 36 36 20 20 31 31  0¯¯¯¯¯100666¯¯11
00F0: 32 20 20 20 20 20 20 20 60 0A 02 00 00 00 A8 01  2¯¯¯¯¯¯¯`¬·°°°¤·
0100: 00 00 A8 02 00 00 0B 00 00 00 02 00 02 00 02 00  °°¤·°°·°°°·°·°·°
0110: 02 00 01 00 01 00 02 00 02 00 01 00 02 00 02 00  ·°·°·°·°·°·°·°·°
0120: 42 53 53 00 42 65 65 70 2E 44 31 36 00 43 47 52  BSS°Beep.D16°CGR
0130: 4F 55 50 00 43 4F 44 45 00 44 41 54 41 00 44 47  OUP°CODE°DATA°DG
0140: 52 4F 55 50 00 44 47 52 4F 55 50 00 45 78 69 74  ROUP°DGROUP°Exit
0150: 2E 44 31 36 00 4D 73 67 00 52 4F 44 41 54 41 00  .D16°Msg°RODATA°
0160: 57 72 69 74 65 2E 44 31 36 00 2F 2F 20 20 20 20  Write.D16°//¯¯¯¯
0170: 20 20 20 20 20 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯¯¯¯¯¯¯0¯¯¯¯¯
0180: 20 20 20 20 20 20 30 20 20 20 20 20 30 20 20 20  ¯¯¯¯¯¯0¯¯¯¯¯0¯¯¯
0190: 20 20 31 30 30 36 36 36 20 20 32 20 20 20 20 20  ¯¯100666¯¯2¯¯¯¯¯
01A0: 20 20 20 20 60 0A 00 0A 74 39 30 35 37 2F 20 20  ¯¯¯¯`¬°¬t9057/¯¯
01B0: 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20  ¯¯¯¯¯¯¯¯0¯¯¯¯¯¯¯
01C0: 20 20 20 20 30 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯0¯¯¯¯¯0¯¯¯¯¯
01D0: 31 30 30 36 36 36 20 20 31 39 36 20 20 20 20 20  100666¯¯196¯¯¯¯¯
01E0: 20 20 60 0A 4C 01 01 00 00 00 00 00 66 00 00 00  ¯¯`¬L··°°°°°f°°°
01F0: 05 00 00 00 00 00 00 00 44 41 54 41 00 00 00 00  ·°°°°°°°DATA°°°°
0200: 00 00 00 00 00 00 00 00 2A 00 00 00 3C 00 00 00  °°°°°°°°*°°°<°°°
0210: 00 00 00 00 00 00 00 00 00 00 00 00 40 00 50 C0  °°°°°°°°°°°°@°P¤
0220: 31 36 62 69 74 20 53 4D 41 4C 4C 20 4C 49 42 43  16bit¯SMALL¯LIBC
0230: 4F 46 20 70 72 6F 67 72 61 6D 20 22 74 39 30 35  OF¯program¯"t905
0240: 37 2E 6C 69 62 22 2E 0D 0A 00 2E 66 69 6C 65 00  7.lib".·¬°.file°
0250: 00 00 00 00 00 00 FE FF 00 00 67 01 74 39 30 35  °°°°°°¤¤°°g·t905
0260: 37 2E 68 74 6D 00 00 00 00 00 00 00 00 00 44 41  7.htm°°°°°°°°°DA
0270: 54 41 00 00 00 00 00 00 00 00 01 00 00 00 03 01  TA°°°°°°°°·°°°··
0280: 2A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  *°°°°°°°°°°°°°°°
0290: 00 00 4D 73 67 00 00 00 00 00 00 00 00 00 01 00  °°Msg°°°°°°°°°·°
02A0: 0C 00 02 00 04 00 00 00 74 39 30 35 37 2E 4F 4D  ·°·°·°°°t9057.OM
02B0: 46 2F 20 20 20 20 20 20 30 20 20 20 20 20 20 20  F/¯¯¯¯¯¯0¯¯¯¯¯¯¯
02C0: 20 20 20 20 30 20 20 20 20 20 30 20 20 20 20 20  ¯¯¯¯0¯¯¯¯¯0¯¯¯¯¯
02D0: 31 30 30 36 36 36 20 20 34 35 32 20 20 20 20 20  100666¯¯452¯¯¯¯¯
02E0: 20 20 60 0A 4C 01 03 00 00 00 00 00 F0 00 00 00  ¯¯`¬L··°°°°°¤°°°
02F0: 0B 00 00 00 00 00 00 00 43 4F 44 45 00 00 00 00  ·°°°°°°°CODE°°°°
0300: 00 00 00 00 00 00 00 00 38 00 00 00 8C 00 00 00  °°°°°°°°8°°°¤°°°
0310: C4 00 00 00 00 00 00 00 03 00 00 00 20 00 50 60  ¤°°°°°°°·°°°¯°P`
0320: 52 4F 44 41 54 41 00 00 00 00 00 00 00 00 00 00  RODATA°°°°°°°°°°
0330: 0D 00 00 00 E2 00 00 00 00 00 00 00 00 00 00 00  ·°°°¤°°°°°°°°°°°
0340: 00 00 00 00 40 00 50 40 42 53 53 00 00 00 00 00  °°°°@°P@BSS°°°°°
0350: 00 00 00 00 00 00 00 00 07 00 00 00 00 00 00 00  °°°°°°°°·°°°°°°°
0360: 00 00 00 00 00 00 00 00 00 00 00 00 80 00 50 C0  °°°°°°°°°°°°¤°P¤
0370: B4 02 8A 14 80 FA 00 74 05 CD 21 46 EB F4 C3 BE  ¤·¤·¤¤°t·¤!F¤¤¤¤
0380: 02 00 E8 EB FF BE 00 00 E8 E5 FF C3 BE 00 00 C7  ·°¤¤¤¤°°¤¤¤¤¤°°¤
0390: 04 45 6E C7 44 02 64 20 C7 44 04 0A 0D C6 44 06  ·En¤D·d¯¤D·¬·¤D·
03A0: 00 E8 CC FF B4 4C CD 21 10 00 00 00 06 00 00 00  °¤¤¤¤L¤!·°°°·°°°
03B0: 01 00 16 00 00 00 06 00 00 00 01 00 1D 00 00 00  ·°·°°°·°°°·°·°°°
03C0: 02 00 00 00 01 00 07 00 42 65 65 70 69 6E 67 2E  ·°°°·°·°Beeping.
03D0: 2E 2E 00 00 2E 66 69 6C 65 00 00 00 00 00 00 00  ..°°.file°°°°°°°
03E0: FE FF 00 00 67 01 74 39 30 35 37 2E 68 74 6D 00  ¤¤°°g·t9057.htm°
03F0: 00 00 00 00 00 00 00 00 42 53 53 00 00 00 00 00  °°°°°°°°BSS°°°°°
0400: 00 00 00 00 03 00 00 00 03 01 00 00 00 00 00 00  °°°°·°°°··°°°°°°
0410: 00 00 00 00 00 00 00 00 00 00 00 00 43 4F 44 45  °°°°°°°°°°°°CODE
0420: 00 00 00 00 00 00 00 00 01 00 00 00 03 01 38 00  °°°°°°°°·°°°··8°
0430: 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00  °°·°°°°°°°°°°°°°
0440: 52 4F 44 41 54 41 00 00 00 00 00 00 02 00 00 00  RODATA°°°°°°·°°°
0450: 03 01 0D 00 00 00 00 00 00 00 00 00 00 00 00 00  ···°°°°°°°°°°°°°
0460: 00 00 00 00 42 65 65 70 2E 44 31 36 0F 00 00 00  °°°°Beep.D16·°°°
0470: 01 00 00 00 02 00 45 78 69 74 2E 44 31 36 1C 00  ·°°°·°Exit.D16·°
0480: 00 00 01 00 00 00 02 00 00 00 00 00 04 00 00 00  °°·°°°·°°°°°·°°°
0490: 00 00 00 00 01 00 00 00 02 00 0E 00 00 00 57 72  °°°°·°°°·°·°°°Wr
04A0: 69 74 65 2E 44 31 36 00                          ite.D16°

▲Back to the top▲