3 ms·
He could have also written the thing in assembly, stored the machine code in DATA statements, loaded it into an array with a READ/POKE loop, and then called it
by pwdisswordfish4 6y ago
He could have also written the thing in assembly, stored the machine code in DATA statements, loaded it into an array with a READ/POKE loop, and then called it with CALL ABSOLUTE.
I actually used this technique to replace Nibbles’ busy-waiting delay loop with an invocation of interrupt 0x15 service 0x86.
- _Microft 6y agoGreat idea, I thought "too bad that QBasic didn't support assembly", on the other hand - I definitely wrote painting programs that used the mouse in QBasic, so I must have used it one way or another. QuickBasic had support for inline assembly though if I remember correctly?
- mysterydip 6y agoI remember the "show the cursor on the screen and grab mouse position and clicks" was a common copy/paste bit of assembly back in the day. Looks like both qbasic and quickbasic supported it: - dim asm as string - concatenate your assembly together - DEF SEG = VARSEG(ASM) - CALL ABSOLUTE(SADD(ASM))
- TonyTrapp 6y agoQuickBasic could load external libraries (potentially written in C or Assembly), but there was no inline assembly - just CALL ABSOLUTE on binary blobs as with QBasic 1.1.
- elvis70 6y ago> QuickBasic had support for inline assembly though if I remember correctly? No but BBC Basic did!