diff options
| author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2020-07-06 13:47:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-06 13:47:59 -0400 |
| commit | c480632d5494d04f7f5f0298a31877a2293b564e (patch) | |
| tree | 02483fc07e60d64a4b526ce8b402f26960ad33b2 /home/print_num.asm | |
| parent | Merge pull request #261 from Rangi42/master (diff) | |
| parent | text_linkpromptbutton -> text_waitbutton (diff) | |
| download | pokeyellow-c480632d5494d04f7f5f0298a31877a2293b564e.tar.gz pokeyellow-c480632d5494d04f7f5f0298a31877a2293b564e.tar.xz pokeyellow-c480632d5494d04f7f5f0298a31877a2293b564e.zip | |
Merge pull request #262 from Rangi42/master
Miscellaneous
Diffstat (limited to 'home/print_num.asm')
| -rw-r--r-- | home/print_num.asm | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/home/print_num.asm b/home/print_num.asm index 5155977b..f7ea2174 100644 --- a/home/print_num.asm +++ b/home/print_num.asm @@ -59,18 +59,20 @@ PrintNumber:: cp 6 jr z, .hundred_thousands -print_digit: macro +print_digit: MACRO -if (\1) / $10000 +IF (\1) / $10000 ld a, \1 / $10000 % $100 -else xor a -endc +ELSE + xor a +ENDC ld [hPowerOf10 + 0], a -if (\1) / $100 +IF (\1) / $100 ld a, \1 / $100 % $100 -else xor a -endc +ELSE + xor a +ENDC ld [hPowerOf10 + 1], a ld a, \1 / $1 % $100 @@ -78,7 +80,7 @@ endc call .PrintDigit call .NextDigit -endm +ENDM .millions print_digit 1000000 .hundred_thousands print_digit 100000 |
