DGivney / assemblytutorials

This project was put together to teach myself NASM x86 assembly language on linux.
https://asmtutor.com/
654 stars 117 forks source link

Lesson 16 checks #17

Closed Skeevert closed 5 years ago

Skeevert commented 5 years ago

.multiplyLoop checks, if the pointed byte is less than 48 or greater than 57, then it checks if equal 10 or equal 0. I believe, that last two checks don't make any sense, as both 0 and 10 values are less than 48

Skeevert commented 5 years ago

It's also worth mentioning, that atoi tries to get number from first parameter, which is a program name. So it can recognize 123/atoi as 123 and use it in calculations

DGivney commented 5 years ago

Hi Skeevert

I've removed those superflous checks in atoi and added some logic to specifically handle the use-case you described.

Thanks for submitting the issue.