Back in the days of Intel 80386, PC XT, MS-DOS, Turbo Pascal, I could develop 
projects and bring them to products, involving self-designed electronics boards 
for data acquisition and control, either attached externally to the serial 
port, parallel port, or internally, directly inserted into the bus slots. I 
could manage to get basically full direct access to the complete address map of 
all internals, down to controller ports and even access the individual signals 
at the bus, serial and parallel ports, keyboard controller ports, mapped video 
card memory, direct memory access, disk management, real-time clock, etc., some 
of which became obsolete later with the introduction of USB and newer wired or 
wireless technologies.

All that was possible back then thanks to the open architecture literature, and 
read/write access to the internals was possible. Besides, all schematics of the 
IBM PC XT mainboard and peripherals and the internals port addresses were 
public, BIOS was fully documented with all assembler instructions available; 
besides, there was an excellent book on internals by Peter Norton. That was 
like, we could do almost every imaginable project to interface a PC down from 
custom designed equipment up to the user interface level using a single 
programming language (i.e. Turbo Pascal and some inline assembler).

Then I took a different route in my career, which does not involve programming, 
but only electronics. Getting closer to my retirement age, I am planning on 
getting back to my R&D basics at the software/hardware level, but things have 
changed a lot since the introduction of the Protected Mode, the PC 
architectures, and the evolution of all Graphic OS's starting with Windows, 
Linux, Ubuntu, etc.

My question is on how deep can we dive safely using Nim, either running Windows 
or Linux, and be able to read/write directly into the PC internals nowadays? I 
know this is very OS and hardware dependent, but my intention is not developing 
portable software/hardware, instead, those that involve research on a specific 
platform and OS.

Can we use Nim without making the system crash (for sure it will if we don't 
know what we're doing) to:

  * Create Interrupt Traps (rewrite or bypass an interrupt service provided by 
BIOS or OS)?
  * Read and Write to mapped addresses of controller ports? (i.e. mapping a 
variable or array to a specific protected address)
  * Achieve Direct Memory Access to directly read/write protected memory blocks?



... and, is there any available documentation that may guide me on how to 
achieve these goals?

Thanks

Reply via email to