An emulator, assembler, and disassembler for the Sega Game Gear
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 

31 rader
1.1 KiB

  1. ;; Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
  2. ;; Released under the terms of the MIT License. See LICENSE for details.
  3. ; ----- CRATER UNIT TESTING SUITE ---------------------------------------------
  4. ; This file contains basic header code for standard assembly files in the unit
  5. ; testing suite. It sets values for the ROM header, and contains basic test
  6. ; runner code.
  7. .optimizer off ; Generate faithful rather than fast code
  8. .rom_size auto ; Smallest possible ROM size >= 32 KB
  9. .rom_header auto ; Standard header location (0x7FF0)
  10. .rom_checksum off ; Don't write a ROM checksum to the header
  11. .rom_product 0 ; Zero product code
  12. .rom_version 0 ; Zero version number
  13. .rom_region "GG Export" ; Common region code for Western ROMs
  14. .rom_declsize auto ; Set declared size to actual ROM size
  15. ; Main routine (execution begins here)
  16. .org $0000
  17. main:
  18. di ; Disable maskable interrupts
  19. call test ; Run test subroutine
  20. emu except(done) ; Signal to emulator that test is done
  21. ; Non-maskable interrupt handler (should not happen; raise an exception)
  22. .org $0066
  23. nmi_handler:
  24. emu except(nmi) ; Signal to emulator that an NMI was received