File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 77; - https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html
88
99BITS 64
10+ DEFAULT REL ; Use RIP-relative addressing by default which is faster and smaller
1011
1112; Needs to be page aligned - there is some historical reasons why it's usually
1213; set to 0x08048000 but it's not required. From my testing 0x10000 is the lowest
8283to_decimal_loop:
8384 xor edx , edx ; `edx` must be zeroed (`edx` and `eax` are combined for 64bit division)
8485 div dword [ ten ] ; divide by 10
85- add edx , '0' ; remainer in `edx`, convert it to ascii
86+ add edx , '0' ; remainder in `edx`, convert it to ascii
8687 dec rsi ; move to the previous char in the buffer
8788 mov [ rsi ], dl ; store the ascii character
8889 test eax , eax ; quotient in `eax`, test if 0
You can’t perform that action at this time.
0 commit comments