This is so cool! But couldn't you write a print_number function? I wrote this little fibonacci function but I can't be arsed to test it if it works - it's too much work writing a number-to-ascii converter when I don't know if I even can send a memory address to the print function. :)
Or maybe display what the registers contains after the program has ended? That would work!
(I take no responsibility for any errors - it's been yeeears since I did any asm!)
Or maybe display what the registers contains after the program has ended? That would work!
; In: eax = n ; Out: ecx = fib(n) mov ebx, 0 mov ecx, 1 loop: mov edx, ebx add edx, ecx mov ebx, ecx mov ecx, edx dec eax, 1 cmp eax, 0 jg loop
(I take no responsibility for any errors - it's been yeeears since I did any asm!)