flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 09 Jul 2003, 20:20
There are linkers for DOS that accept COFF format and this is now the only solution - I was considering adding OMF support, but it would be very hard with the "flat" architecture of fasm.
|
|||
![]() |
|
Kevin_Zheng 16 Jul 2003, 14:58
Dear privalov:
I have writed a program for DOS that used COFF format . Please used the build.bat for linked it. In the first, using the fasm complier for getting a COFF OBJ module, Then used the blink.exe linked it . Thanks you big helping. ![]() Code: FORMAT MS COFF section '.text' code readable executable USE16 public _Start _Start: call near @f @@: pop ebx mov eax,@b sub ebx,eax ;Calculate the Loaded Address mov ah,9 mov edx,hello add edx,ebx ;Get the Runtime Adddress int 21H mov ax,4c00H int 21H section '.data' data readable writeable hello db 'MS COFF OBJ Format for DOS Demo Program',0DH,0AH db 'Hello, The FASM World!',0DH,0AH db 'Designer:Kevin Zheng 2003/07/16','$' |
|||
![]() |
|
Tomasz Grysztar 16 Jul 2003, 17:20
There was a problem with your attachment, please post it again.
BTW: for DOS programs you'll probably have to use "format COFF" variant instead of "format MS COFF", but it may depend on what linker are you using. The most important difference is in dealing with calls to procedures in other objects - the Microsoft COFF uses in that case relocations which are not compatible with original COFF format. |
|||
![]() |
|
Kevin_Zheng 17 Jul 2003, 09:43
Dear privalov:
Thanks your advice. I have modified it and repost it.
|
|||||||||||
![]() |
|
Vortex 17 Jul 2003, 11:37
Kevin_Zheng,
Thanks for your nice example. Where can I find a manual for blink? Regards, Vortex _________________ Code it... That's all... |
|||
![]() |
|
Kevin_Zheng 17 Jul 2003, 14:35
Dear Vortex:
The blink.exe is downloaded from the belowing network address: http://edenos.myrice.com/. The author of the blink.exe is a China. The language is a problem. And others, I haven't found another COFF linker for DOS enviroment. So you maybe found it. Best Regards. |
|||
![]() |
|
Tomasz Grysztar 17 Jul 2003, 14:56
DJGPP uses COFF format natively (compiles programs for DPMI), there's also a DOS version of binutils, which has built-in support for COFF files.
|
|||
![]() |
|
Vortex 17 Jul 2003, 18:04
Hi Kevin_Zheng,
Your commandline: Code: blink /b161000 doscoff.obj,doscoff.exe So,how you found the 161000 value? Is it an experimental result? Have a look at Wuschel's DOS extender,it can be helpfull for you: http://michael.tippach.bei.t-online.de/wdosx/ Thanks, Vortex _________________ Code it... That's all... |
|||
![]() |
|
Kevin_Zheng 18 Jul 2003, 12:53
Dear Vortex:
Please see the helpping of blink.exe . "blink /b16100 doscoff.obj,doscoff.exe " It means the 16-bit segment and base address on the 100H. <<User Help screen Blink 1.04 by swordhui Support OMF and COFF format. also support OMF+COFF ! Usage: Blink [options] objfiles,binName,MapName,libNames Options: /b16XXXX Specify base address of 16-bit segment. /b32XXXXXXXX Specify base address of 32-bit segment. /c Case sensitivity on symbol. /r Generate relocation file(.rlc). Sample: blink /b167C00 /b3210000 test1+test2,test.bin,,lib+lib2 And Others, DJGPP and wdosx linker needed extra DPMI memory manager. But I don't liked the extra memory manager, Because I hoped my program worked freely , the TSR memory manager will affort some compatiblity err and it's maximum ability that only supported 16M memory. I have writed a subroutine that used for enter protected mode and adjusted the CPU mode is BIG real mode, so I directly accessed 4GB memory. in the future, I will added a routine for supported Intel CPU PAE mode. It's supported the 64G memroy. I think that it is the best for using memory method on the DOS enviroment. So I only needed a linker that support 16 bit segments mixed 32 bit segments and supported a pure dos MZ file. It means doen't needed extra TSR memroy manager. Thanks your helping. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.