Will support for 16-bit assembler be added to FPC in the future ?
Mailing lists / fpc-devel / 2000-12
Support for 16-bit assembler ?
13 messages · 6 people · –
- DDavor Dundovic 5
- FFlorian Klaempfl 4
- JJonas Maebe 1
- MMarco van de Voort 1
- MMichael Knapp 1
- MMichael Van Canneyt 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
you wroteWill support for 16-bit assembler be added to FPC in the future ?
No, because there is no use for it. FPC is a 32 bit compiler.
>Will support for 16-bit assembler be added to FPC in the future ? No, because there is no use for it. FPC is a 32 bit compiler.
I meant for compatibility reasons. I have a lot of assembly code built in my TPUs and it is pain in the neck to change that to 32-bit code.
BTW, I don't know if this is right mailing-list, both DOS and Windows versions of IDE are quite unstable. They crash every 10 compiling or so.
Show quoted text 7 lines
Afaik, everything 16-bit that runs in 32-bit protected mode is supported (like purely calculating code). Supporting 16-bit segment and hardware interfacing would come down to writing a 16-bits realmode emulator inside the 32-bit extender.
Marco van de Voort ( or )
I meant for compatibility reasons. I have a lot of assembly code built in my TPUs and it…
you wrote 7 lines
There is no way, you've to rewrite it because 32 bit protected mode uses a completly
different memory model.
BTW, I don't know if this is right mailing-list, both DOS and Windows versions of IDE are quite
It is the right one.
unstable. They crash every 10 compiling or so.
Which version do you use?
Show quoted text 6 lines
OK, different question: is it possible to read/write from/to absolute address without generating runtime error ?
var p : ^byte;
begin
p := $f0000000;
writeln(p^);
end.This program generates runtime error 216. This is, I belive, general protection fault.
Show quoted text 8 lines
FreePascal IDE for Win32 Version 0.9.1 2000/10/12 (Compiler Version 1.0.2) and the DOS version is that which came in dosw32102full.zip.
I have downloaded snapshot hoping some of the problems would be solved so current version is
FreePascal IDE for Dos
Version 0.9.1 2000/12/03
(Compiler Version 1.1)
(Debugger GDB 4.18.pas.b1)
I'm having some problems with these snapshots. First of all what files do I need. Is it sufficient to DL basego32.zip, idego32.zip, basew32.zip and idew32.zip ? Also basew32.zip and idew32.zip downloaded from site in Germany had errors and could not be unpacked. I don't know if the problem is on my side.
I have already submitted two bug reports.
Davor Dundovic wrote 19 lines
It's ok that the program crashes ... :-)
that should work
uses go32v2;
var p:^byte;
begin
set_segment_limit(get_ds,$ffffffff);
p:=pointer(get_linear_addr($f0000000,1)-get_segment_base_address(get_ds));
writeln(p^);
end.IMPORTANT: Write to any addresses ONLY if you know which areas in the address space you (over)write, otherwise
it could result in data loss (happened to me once)
Michael
you wrote 30 lines
... and it works only for the DOS version. There is no way to get this working on linux/win/os2 etc
It's ok that the program crashes ... :-) that should work uses go32v2; var p:^byte; begin…
you wroteIt's ok that the program crashes ... :-)
;-))
Show quoted text 12 lines
Very complicated. :-(( I have over 3 MB of Turbo pascal code, some of it written in BASM, which I would like to port to FP. It's not going to be an easy task.
I use absolute addresses mostly for fast writing characters to video memory. How do I do that in FP ? Is there a unit that I could use ?
Davor Dundovic wrote 28 lines
Yes, the video unit.
It's not yet documented, though.
But the IDE uses it so it performs well..
Michael.
;-)) Very complicated. :-(( I have over 3 MB of Turbo pascal code, some of it written…
you wroteI use absolute addresses mostly for fast writing characters to video memory. How do I do that in FP ? Is there a unit that I could use ?
Which OS do you use? Under go32v2 you can use the mem[...] array as with TP/BP.
Show quoted text 5 lines
DOS/Win98. I have various assembly fastwrite routines that I can't use under FP. Michael mentioned video unit. Is there any kind of documentation for it ? An example program maybe ?
Show quoted text 9 lines
The video unit still doesn't allow you direct access to the screen, it only has a virtual buffer (a simple array) to which you can write and afterwards you can tell the video unit to blit its contents to screen (with a choice whether only the changed parts should be updated or the whole screen).
Direct (text video) memory access is simply not possible under Win32.
Jonas
