in/out Ports in HLLs (e.g. Turbo Pascal, BRexx, QBASIC) (Developers)
In SBMIX, written in Turbo Pascal 6+, there are IN/OUT instructions via inline BASM assembly.
Obviously, TP 5.5 can do the same in different ways (vaguely similar to Modula-2; bah, one guy just used inline asm anyways!). FPC and GPC (among others??) support such TP "port" usage. (Here's a small tutorial.)
But even that is somewhat limited and "ad hoc". While native compilation is fine for some things (smaller, faster), maybe it could also be avoided? Would an interpreter work better (ease maintenance of such low-level tasks)? Presumably, many people have done this before for DOS, but I don't know of many obvious implementations.
The 16-bit DOS version of BRexx 2.1.0 (from 2003) has support for some low-level things (INTR and PORT). (Here's an old review. And here's Howard Fosdick's freeware REXX book as PDF.)
Here's a tutorial for QBASIC for various memory management routines and accessing I/O ports.
Probably a lot of old DOS demos and games (X2FTP?) used such low-level stuff, but I haven't studied closely yet.
Complete thread:
- in/out Ports in HLLs (e.g. Turbo Pascal, BRexx, QBASIC) - Rugxulo, 09.04.2020, 04:05 (Developers)
- in/out Ports in HLLs (e.g. Turbo Pascal, BRexx, QBASIC) - marcov, 09.04.2020, 12:27
- in/out Ports in HLLs (e.g. Turbo Pascal, BRexx, QBASIC) - Rugxulo, 10.04.2020, 07:39
- in/out Ports in HLLs (e.g. Turbo Pascal, BRexx, QBASIC) - marcov, 10.04.2020, 14:19
- Perl changes - Rugxulo, 26.06.2020, 01:37
- in/out Ports in HLLs (e.g. Turbo Pascal, BRexx, QBASIC) - marcov, 10.04.2020, 14:19
- in/out Ports in HLLs (e.g. Turbo Pascal, BRexx, QBASIC) - Rugxulo, 10.04.2020, 07:39
- in/out Ports in HLLs (e.g. Turbo Pascal, BRexx, QBASIC) - marcov, 09.04.2020, 12:27