Thomas Mueller wrote:
>
> How do you enter the null character (Hex 00)? Alt-000 would not work for that.
That seems to be ONE of the limitations of the method.
You can't enter alt03 either, and while you CAN enter alt26, DOS won't
write anything following it to the file.
Darned serious short sightedness if you ask me. :((
>
> Any way to use BASIC to create a small binary file? Or is that only for older
> computers?
Sure. You can use Basic with modern computers.
This should create the beeping myprog.com:
10 OPEN "O",#2,"MYPROG.COM" : REM That's an oh not a zero
20 PRINT #2, CHR$(178)+CHR$(07)+CHR$(180)+CHR$(02); : REM That's a semicolon
30 PRINT #2, CHR$(205)+CHR$(33)+CHR$(205)+CHR$(32)
40 CLOSE #2
50 SYSTEM
Looking at the above it can be seen that you just need a general routine:
PRINT#2, CHR$(NUM): RETURN
to create a com file of any length.
And some other routine to translate your HEX entry into decimal (I have it).
And some other routine to translate your mnemonics into HEX or decimal -
like MOV AH,02 becomes B4 02 which becomes 180 02.(I have it too - for 6502)
There are also MANY other ways to do it in Basic, but the above continues
nicely from the previous example. <G>
This was tested and found to have no problem with 00H, 03H or 1AH.
The file length will be a multiple of 128 bytes with this method but there
are other methods (eg PUT) which will give you a length without padding.
The padding does NOT affect the program tho.
- Clarence Verge
--
- Help stamp out FATWARE. As a start visit: http://home.arachne.cz/
- The internet is infected - Windows is a VIRUS !!
--