mirror of
https://github.com/pret/pokegold-spaceworld.git
synced 2026-08-09 03:34:37 -05:00
Addresses of sections will now be added to the linkerscript via `org`, and the section name will be the path/to/file. If there is more than one section in the file, then add a @SectionName after the path/to/file to describe the section.
25 lines
281 B
NASM
25 lines
281 B
NASM
include "constants.asm"
|
|
|
|
; if DEBUG
|
|
SECTION "home/math.asm", ROM0
|
|
; else
|
|
; SECTION "Math utility functions", ROM0 [$3344]
|
|
; endc
|
|
|
|
Multiply::
|
|
push hl
|
|
push bc
|
|
callab _Multiply
|
|
pop bc
|
|
pop hl
|
|
ret
|
|
|
|
Divide::
|
|
push hl
|
|
push de
|
|
push bc
|
|
homecall _Divide
|
|
pop bc
|
|
pop de
|
|
pop hl
|
|
ret |