' Runs some x86 assembly instructions in QBasic. ' CODE$ must contain some bytes in hex format ' with no spaces in between. ' ' For example, this code speeds up the keyboard ' by changing the repeat rate from 750ms to 250ms: ' ' ASM "B8050333DBCD16CB" ' SUB ASM (CODE$) A = 0 DEF SEG = &HBA00 ' Here we convert the hex numbers to binary code ' and we write the bytes to BA00:0000 which is a ' part of the video memory that is mostly unused. ' This is a 23KB memory hole full of zeros. FOR I = 1 TO LEN(CODE$) STEP 2 POKE A, VAL("&H" + MID$(CODE$, I, 2)) A = A + 1 NEXT I ' Now the processor will jump to BA00:0000 ' and run whatever code we just copied there. DEF SEG = &HBA00 CALL ABSOLUTE(0) DEF SEG END SUB