flat assembler
Message board for the users of flat assembler.
Index
> DOS > problem with unREAL mode fasm Goto page Previous 1, 2, 3, 4, 5 Next |
Author |
|
revolution 11 Feb 2008, 14:25
You still don't have a jump after you change cr0! bitRAKE showed you that even a near jump will work.
|
|||
11 Feb 2008, 14:25 |
|
Polygon 11 Feb 2008, 15:17
Opp's! Posted the old code. The jump is there.... OK, fixed the post.
Still something out of wack |
|||
11 Feb 2008, 15:17 |
|
revolution 11 Feb 2008, 16:10
You have jmp 8:label. Remember that the 8 means load CS with the second descriptor in the GDT. Maybe you could add another descriptor (as a code segment) for CS and then jump 16:label.
|
|||
11 Feb 2008, 16:10 |
|
Polygon 11 Feb 2008, 16:59
I'm really way over my head with this, and don't know how to do that. Sorry
I'll try the near jump and see what happens... |
|||
11 Feb 2008, 16:59 |
|
revolution 11 Feb 2008, 17:16
The instruction: jmp seg:label,
seg ---> CS label ---> IP if seg=8 then get descriptor from GDT+8, if seg=16 then get descriptor from GDT+16, etc. In your GDT you have at +8 a data segment. So you cannot load that into CS, the CPU won't allow it. Which means, you have two options: 1) try what bitRAKE showed and use a near jmp, or 2) make a new descriptor at GDT+16 that is a code segment descriptor and use jmp 16:label |
|||
11 Feb 2008, 17:16 |
|
Polygon 11 Feb 2008, 17:30
OK, thanks! I was doing fine until I needed to understand segments and descriptors; I need to go back and hit the books. Thanks again!
|
|||
11 Feb 2008, 17:30 |
|
rugxulo 13 Feb 2008, 06:08
http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/pkgs/frms.zip
Quote:
|
|||
13 Feb 2008, 06:08 |
|
DOS386 18 Feb 2008, 04:39
Rugxulo wrote:
Quote: latest testing r6 of CWSDPMI is recommended over r5 if you want access to huge amounts of RAM It's from 2001, and not really useful Tomasz wrote: Quote: I also did play with DOS interface a bit, I fixed some bugs and also managed to free some space under the 64k code limit, so that I still don't have to get rid of the unREAL mode from the DOS interface. Rescued Un-REAL to 1.67.26 ... but still it seems to be a battle that can't be won this way _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
18 Feb 2008, 04:39 |
|
neville 17 Jul 2008, 21:47
I'm not sure what the problem really is here, but I certainly rely on "unreal" or "flat real" mode - it's what I use for FAMOS memory operating system.
But, I understand Intel Long Mode does NOT support unreal mode so I will probably have to resort to Prot mode for future 64-bit versions of FAMOS About the code space - yes DOS flat binaries (COM) must only occupy 1 64K seg, but DOS EXE's must only run below the 16-bit seg:offset 1Mb limit. In FAMOS flat real mode, I run flat executable binaries up to 512Kb (across the equivalent of 8 DOS 64K segments!), and all executable code can be paged in from the 4-gig 32-bit memory space where it resides under FAMOS. _________________ FAMOS - the first memory operating system |
|||
17 Jul 2008, 21:47 |
|
Kedar 21 Nov 2008, 01:53
Hi Tomasz. I've been working on a 3D GFX program, developed from Kelvar as wrapper code (no offense, credit given). It works well under DOS at this stage, except:
1 The GFX are slower than I would expect (I figure I should be writing to the video card directly for best results), 2 The program wont run under command prompt in 98 or XP (protected mode). I presume the unREAL mode is a factor. What do you suggest? (Thanks for FASM by the way, it's still the best PC ASM I've seen...) |
|||
21 Nov 2008, 01:53 |
|
DOS386 21 Nov 2008, 02:06
> 1 The GFX are slower than I would expect (I figure I should be writing to the video card directly for best results)
VESA LFB uses direct write. Make sure to set the MTTRR's to "WC" (double-you-see ) for the VESA LFB (CPUID first !). Speed up depends from CPU + M.B. + G.C. : 1.000yyy times up to (reportedly) cca 50 times !!! > 2 The program wont run under command prompt in 98 or XP > (protected mode). I presume the unREAL mode is a factor. > What do you suggest? Develop for the "correct" OS matching your taste. Don't run DOS code in Windoze. |
|||
21 Nov 2008, 02:06 |
|
DOS386 21 Nov 2008, 02:14
FYI, in 1.67.28 (obsolete) I found cca 1.5 KiB reserve without listing hack and cca 256 bytes with it ... no investigation of 1.67.29 yet. The trick was splitting DPMISYS.INC (no 64 KiB limit) from SYSTEM.INC .
|
|||
21 Nov 2008, 02:14 |
|
Kedar 23 Nov 2008, 21:43
Re VESA LFB uses direct write. Make sure to set the MTTRR's to "WC" (double-you-see ) for the VESA LFB (CPUID first !).
...um, do you get code with that? I'm just using a modification of Kelvar's VESA routines that gives me 800*600 and allows me to choose 256, 32K, or TC (1, 2, 4 bpp respectively for speed). I'm used to thinking Amiga and writing direct to Chip RAM and Custom Regs, and setting the Copper to load this to screen, giving me 50 Hz redraw. I'd like code that gives me the equivalent on PC, and so far I feel like I got faster and more professional results on my 8 MHz Amiga 2000. Is anyone interested in a project, ie developing the pseudo-ultimate open source wrapper code for DOS Fasm? (Fasm OS instead of FreeDOS/MS-DOS wouldn't suck either) This could resolve numerous GFX, SFX, etc issues for all, while all get to keep their personal project code private. |
|||
23 Nov 2008, 21:43 |
|
DOS386 24 Nov 2008, 10:53
Kedar wrote: ...um, do you get code with that? http://homepage.ntlworld.com/gvision/gv/vesamtrr.zip Open source, MASM |
|||
24 Nov 2008, 10:53 |
|
Kedar 25 Nov 2008, 03:02
Sorry, I thought it was clear I meant FASM source code, but thanks for the executable...I'll try it...
...Again, sorry, I thought the reason I was at this site was because FASM and masm are different things, with FASM being the preference... |
|||
25 Nov 2008, 03:02 |
|
DOS386 28 Nov 2008, 09:14
> was at this site was because FASM and masm are different things, with FASM being the preference...
True, but you can test the executable, if it brings the speedup, when ran before your code (effect remains until a reboot). If YES, you can port it to FASM. Hint: NDISASM is your friend. I don't have a FASM version |
|||
28 Nov 2008, 09:14 |
|
Kedar 02 Dec 2008, 02:41
...my hard drive just lost its FAT...
...so I might be a while... |
|||
02 Dec 2008, 02:41 |
|
DOS386 19 Feb 2009, 07:07
Tomasz wrote (2008-Jan-09) :
Quote: I'm OK with throwing away the unreal, but I won't provide DPMI host with fasm. I just feel it's not the way it should be. I would make it work just like FASMD does now. Done (UNREAL killed ) in 1.67.32. Still dreaming of a FASM version: - Same design for commandline and IDE - Not requiring a DPMI host - Not suffering from 64 KiB limit - Still working if a DOS-based DPMI host is present - Not working on non-DOS |
|||
19 Feb 2009, 07:07 |
|
Tomasz Grysztar 19 Feb 2009, 09:46
I don't plan any more work in that direction. Reverting to own DPMI implementation wouldn't be such a good choice, since there are really much better DPMI implementations available out there.
There was once this guy that made fasm interface to work with VCPI, but it wasn't very good and is forgotten now. The only option I see where the current solution could be improved is to make it scan (in case when no DPMI host is loaded) the PATH directories for one of the known DPMI host executables (like CWSDPMI.EXE) and load it for its single session. That would be the same thing, as the stubs for some of the extenders do. |
|||
19 Feb 2009, 09:46 |
|
Goto page Previous 1, 2, 3, 4, 5 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.