flat assembler
Message board for the users of flat assembler.
Index
> Main > Real mode version of fasm? |
Author |
|
SoLo2 27 Aug 2007, 03:47
I was trying to assemble
with fasm, but the DOSBox would ask for some memory extensor. So I found in a wiki a link to CWSDPMI which has to be called every time before fasm. Is there a possibility of having fasm in 16 bits? Is it all 32bits code? Thanks for this nice ass! SoLo2 _________________ ~~~~~~*~~~~~~~~~~~~~~~~~~~~~~~ http://thebitsclub.tripod.com/ http://so_o2.tripod.com/delfin.html http://so_o2.tripod.com/xmus.html http://www.geocities.com/mud_gallery/index.html |
|||
27 Aug 2007, 03:47 |
|
DOS386 27 Aug 2007, 04:36
> I was trying to assemble
> with fasm, but the DOSBox > would ask for some > memory extensor. Why don't you use the Win32 version if you must run it on Vi$ta ? > So I found in a wiki a link to CWSDPMI > which has to be called every time before fasm. Yes. Works. But CWSDPMI is obsolete, HDPMI32 is much better (for DOS). > Is there a possibility of > having fasm in 16 bits? [NO] > Is it all 32bits code? YES. Would be extremely difficult to port to 16-bit. And, you would have "out of memory" problems then What is your CPU ? P4 ? AMD64 ? And with such you ask for 16-bit ? BTW: NASM has a 16-bit RM version ... untested by me Last edited by DOS386 on 27 Aug 2007, 21:16; edited 1 time in total |
|||
27 Aug 2007, 04:36 |
|
Tomasz Grysztar 27 Aug 2007, 09:32
Versions <=1.48 had a 16-bit FRM version for DOS, but it was no longer supported later.
It may still be possible to re-assembler fasm into 16-bit MZ (as it would no longer fit into .com), thought it would require a bit of work. I suggest that you visit http://fasm.sourceforge.net/archive/ and grab the 1.48 package to try the FASM.COM version (it's in SOURCE/DOS subdirectory). |
|||
27 Aug 2007, 09:32 |
|
DOS386 27 Aug 2007, 21:20
Quote: Versions <=1.48 had a 16-bit FRM version for DOS, but it was no longer supported later. FRM = Unreal mode with 16-bit CS (and all 32-bit stuff prefixed ?) ? Later used 32-bit Unreal mode ? The memory management of FASM is and always was somewhat black magic and undocumented (no mentions about it in version history) ... and seems there were many changes to this code ... http://board.flatassembler.net/topic.php?t=472 bttr complained about FASM preferring Unreal from DPMI ... and it hasn't been fixed up to now. The issue is not critical for me, but I still stink that DPMI should be preferred from Unreal ... FASM still doesn't work if it finds CPU in real mode and DPMI present BTW, FASMD seems to no longer use Unreal ... only DPMI ... so it doesn't suffer from bttr's "DPMI bug" Code: ; flat assembler version 1.0 ; Copyright (c) 1999-2000, Tomasz Grysztar ; All rights reserved. init_flatrm: push sp ; store stack frame pop ax cmp ax,sp ; compare stack frame values jne processor_error ; if not equal, CPU is 8086-80186 !!! BUG !!! smsw ax test al,1 ; processor is in protected mode? jnz pm_error ; if yes, generate error pushf pop ax or ah,F0h ; try to set high 4 bits of FLAGS push ax popf pushf pop ax test ah,F0h jz processor_error ; if bits not set, CPU is 80286 xor eax,eax ; calculate linear address of GDT mov ax,cs shl eax,4 add eax,GDT mov dword [cs:GDTR+2],eax cli ; disable interrupts lgdt pword [cs:GDTR] ; load GDT register SORRY but I have to report a BUG in FASM 1.0 (better late than never ) - the "found <80286 CPU" jump is out of "short" range, encoded with $0F ... ... ... so it will always freeze on the affected CPU's ... I guess ... attempt to POPE CS ... please correct me if I'm wrong No need for a 8086_only directive ? 16-bit CPUID'ding discussed also here: http://board.flatassembler.net/topic.php?t=7204 The archive is definitely interesting : Code: version 1.02 [06-07-2000] ------------ [-] minor bugs fixed [+] some documentation changes version 1.01 [01-07-2000] ------------ [-] fixed bug in MZ header generator version 1.00 [19-06-2000] ------------ [+] first official release version 0.90 [04-05-1999] ------------ [+] first version able to recompile itself version 0.00 [23-03-1999] ------------ [+] flat assembler project was started at 14:24:33 - Project start known with precision of seconds - 1.00 Needed 21 days from compile to release - 1.00 Seems to have very exclusively supported pure real mode DOS only |
|||
27 Aug 2007, 21:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.