09-04-2023, 01:16 AM
You should know better than this. PEEK and POKE, with DEF SEG made the most sense on 16-bit. On 32-bit that began to break down because M$ didn't even want anyone using QuickBASIC and QBasic to use ABSOLUTE nor CALL INTERRUPT. On 64-bit there is even less of a chance to use anything from BIOS. On newer systems BIOS is being left out entirely, cannot use it to boot an operating system anymore. On those newer systems BIOS might have to be emulated.
PEEK does nothing useful these days except for a few areas used far more often than the old COM ports. Such as CGA/EGA video memory.
In later BASIC dialects PEEK and POKE are used toward a memory block allocated by the user. Pure Basic does it like this. That is payware but cannot emulate BIOS and cannot replicate the old interrupts like #9, #13, the large &H21 and others categorized for "advanced" programming in 16-bit back in the day.
For DEG SEG = 0, probably QB64 recognizes the keyboard buffer, but almost nothing else. Cannot even get SCREEN 0 rows and columns anymore like that. How to do that from the terminal under $CONSOLE:ONLY? Cannot check the state of the shift keys like that, must use _KEYDOWN instead.
In QB64 could use C++ code to hook up via USB. (shrugs)
Should be able to do it although writing for devices sucks a lot. Have to know about interfaces and hardware specifications and stuff like that. The other day I downloaded the source code for the Linux kernel v6.1.41. That comes with a few thousand files which have to cover a lot of possibilities. I have only begun wading through the documentation which is not for people having no understanding about electronics, computer engineering and things of that nature.
PEEK does nothing useful these days except for a few areas used far more often than the old COM ports. Such as CGA/EGA video memory.
In later BASIC dialects PEEK and POKE are used toward a memory block allocated by the user. Pure Basic does it like this. That is payware but cannot emulate BIOS and cannot replicate the old interrupts like #9, #13, the large &H21 and others categorized for "advanced" programming in 16-bit back in the day.
For DEG SEG = 0, probably QB64 recognizes the keyboard buffer, but almost nothing else. Cannot even get SCREEN 0 rows and columns anymore like that. How to do that from the terminal under $CONSOLE:ONLY? Cannot check the state of the shift keys like that, must use _KEYDOWN instead.
In QB64 could use C++ code to hook up via USB. (shrugs)
Should be able to do it although writing for devices sucks a lot. Have to know about interfaces and hardware specifications and stuff like that. The other day I downloaded the source code for the Linux kernel v6.1.41. That comes with a few thousand files which have to cover a lot of possibilities. I have only begun wading through the documentation which is not for people having no understanding about electronics, computer engineering and things of that nature.