Entering Machine Language into Blue RAM BASIC --------------------------------------------- By Paul Thacker May 22, 2013 This was originally a message #12390 posted to the Bally Alley discussion group on May 22, 2013 by Paul Thacker. This has been slightly edited. OK, here is my definitive technique for making hybrid machine language/Bally BASIC programs. 1. Using a hex editor or an assembler, create a binary file for the machine language portion on your PC. Use the extension .prg. 2. Using prg2txt, convert the .prg file to a .txt file. It will look like gibberish because it's trying to translate the binary data into the BASIC character set, but that's OK. prg2txt.exe example.prg example.txt -e -n 3. Edit the .txt file as follows. At the very top, type out the program's BASIC code using the prg2txt/txt2prg format. Immediately after the BASIC code, add the following line to load the machine language data to 24576 (6000 in hex), adding the machine code's size in bytes to 24576 to get the ending value in the FOR loop: &(192)=0;A=24576;for N=Ato (24576 + size of machine language);%(N)=KP;next N At the very end of the .txt file, add :return or :return ;run Remember that keywords like return and run need to have a space after them. 4. Use txt2prg to convert the edited .txt file back to a .prg file. txt2prg.exe example-edit.txt example-edit.prg 5. Use KCS to create a .wav file that can be loaded into Bally BASIC with :INPUT. KCSWIN.exe -M -L3 -P35 example-edit.prg example-edit.wav As an example, here's my edited .txt file for the example program in Arcadian volume 2, page 100. 10 A=28672;CALL 24576;print B &(192)=0;A=24576;for N=Ato 24586;%(N)=KP;next N !goto Ngoto &null "return N{-55} :return ;run Paul