I want to know of a simple way to import assembly code into my QB program.
Because my only dos is DOSBOX (I'm running linux), this is what I am currently doing:
1. I write my assembly code
2. I compile it with nasm
3. I extract the data using linux od tool as follows (replacing binary with the filename containing the raw code:
4. I highlight and copy all the hex codes
Code: Select all
od -tx1 -w999 binary
5. I paste them into my program, append a space and use QB mid$ function to extract each hex string and convert it into its actual byte.
The problem is everytime I paste, some codes don't have a space in-between and that's what screws up my program every time!
Is there an easier way to do it where I don't have to manually check to see that all hex codes are evenly spaced? It would be a pain to do this every time I want to change a character in my assembly code.
I would prefer the utility to be run in unix since I have copy and paste functionality there. Maybe there's something better than "od" or maybe I'm not using it perfectly for this purpose.