First of all I don't have any DPMI installed and got no error message so far.
Does it mean current FreeBASIC runtime (memory allocation ...) comes with it own protected mode interface ?
For my Märklin FMX project and CNC router/laser cutter I use the good old LPT port
and DOS as a realtime environment is perfect for such controller stuff.
(I love it no OS task interrupt your code no admin rights needed to access I/O ports etc.)
I connected an oscilloscope and measures ~360 KHz frequency while toggle the bits from LPT port.
Is there an example how to use a hardware timer interrupt handler in FreeBASIC ?
Technical is every call of this interrupt code a jump back from 32-bit to 16-bit BIOS real mode ?
Joshy
EDIT: I know normaly you would use an microcontroler for such low level hardware stuff.
But I like the idea that the DOS hardware controler has a SVGA screen to display the rail road or the current CNC part.
Some questions about fbc for DOS/FreeDOS.
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
Re: Some questions about fbc for DOS/FreeDOS.
1) No, I have just tested on DosBox, FreeBasic returns an error message if there is no DPMI extender. By the way, is the file CWSDPMI.EXE either in the FreeBasic directory, or in another directory in the search path, the program written in FreeBasic (and the compiler itself) can invoke it, loading a DPMI extender on the fly. I guess that somewhere you have the file CWSDPMI.EXE. The DPMI server doesn't need to be pre-installed in memory: there are some TSR versions, but they are only useful to reduce the load time of the DOS executable, saving the time needed to load the extender each time an executable is launched
2) Look in the "examples/DOS" directory, the file "isrtimer.bas". Is it what you need?
2) Look in the "examples/DOS" directory, the file "isrtimer.bas". Is it what you need?
Re: Some questions about fbc for DOS/FreeDOS.
https://www.hackster.io/news/learn-how- ... 7c8ead9deeD.J.Peters wrote: ↑Jun 18, 2022 15:31 But I like the idea that the DOS hardware controler has a SVGA screen to display the rail road or the current CNC part.