Home - RLH-2110/gbCalc GitHub Wiki

GbCalc Overview

GbCalc Is written completely in GBZ80 Assembly
The code may not be the most readable, sometimes I was just doing it the "fun" way.

The Source code has been split into multiple files:

defines.inc

  • Contains Definitions/Constants for all other .asm files.
    It's a good thing to read this first, so you are prepared if you encounter the defines in other files.

hardware.inc

  • A file that's not from me, it has more Definitions and Constants, like for hardware registers

main.asm

  • Contains startup logic and the main loop, and the "Main Function"

ram.asm

  • contains all the variables

grapicsROM.asm

  • contains all the graphics (letters, numbers, ...)

utility.asm

  • contains utility routines, like copying memory, inverting 16 bit registers, ...

calc.asm

  • contains the logic for finding the right calculation routine and the calculation routines, as well as some related helpers

cursorLogic.asm

  • contains code for controlling the cursor

doubleDabble.asm

  • contains routines to turn wResult into BCD

numbers.asm

  • contains routines for manipulation of the numbers on screen, like erasing them or displaying them

store.asm

  • handles loading and storing the numbers when pressing B or Select

[!TIP] You can Find more Info about GBZ80 Assembly gbdev.io and see valid instructions Here and Here