![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
asm.batThe following file is a small DOS batch file that makes life easier for you when compiling your code. The batch file assumes that you have a path set up to the RGBDS executables, and that it is in the same directory as your code. To use asm.bat, copy it to your working directory (where your source code is located) and, whilst in that directory, type: asm sourcenameWhere sourcename is the name of your source file, without the .asm extension (the batch file adds that on automatically). The batch file will compile your code, run RGBFIX to correct the ROM and create your final project.gb file. You can download the file if you don't want to cut and paste the text. To download the file using a PC, right-click the link and select the option "Save Target As" then save the file as you would any other file from windows. ExplanationThe first line turns command echoing off. This stops your screen being filled with the commands as they are run. The next four commands create the link file for your project. After that, the rgb assembler is called to compile your project. Once that has completed successfully, the linker is called to link your project into a gameboy ROM. RGBFIX is then called to correct the checksums and other stuff in your ROM so that it can be used in emulators and the real gameboy.
Source@echo off @echo [Objects] > link @echo %1.obj >> link @echo [output] >> link @echo %1.gb >> link rgbasm -o%1.obj %1.asm if errorlevel 1 goto ending xlink -m%1.lst link if errorlevel 1 goto ending rgbfix -v -p32 %1.gb :ending |