Commit Graph

14 Commits

Author SHA1 Message Date
Elf M. Sternberg a8b5a39290 And Lesson 9: Stdin, goes into the X86_64 update pile. 2018-05-28 09:36:46 -07:00
Elf M. Sternberg 3ebb8fa0af Fixed a typo. 2018-04-30 20:47:14 -07:00
Elf M. Sternberg 33f3aa7752 Lessons 7 & 8: puts with newline, and command line argument handling. 2018-04-30 20:46:25 -07:00
Elf M. Sternberg f3603d7835 Updated with Lesson 5: Include files for subroutines. 2018-04-30 09:09:48 -07:00
Elf M. Sternberg f0f1892c8c Re-organized the files for readability. 2018-04-30 07:38:44 -07:00
Elf M. Sternberg 37bff866a8 Documented the README for Lesson 4. 2018-04-27 17:01:13 -07:00
Elf M. Sternberg 89b58186fb BUG Fix bug in 64-bit subroutine lesson. Streamline 32-bit subroutine lesson.
There was a bug in the 64-bit subroutine lesson that popped the stack
once too many times: there were two pushes but three pops.  That this
didn't generate a stack underflow condition confuses and worries me.
I would have expected a segfault when I decremented the stack counter
once too often.  This makes me wonder if I understand this program well
enough.

The effect on the registers was, fortunately, harmless as the next step
completely repurposed the registers to initialize the exit() routine.

Once I'd figured out how to use the RSI and RAX registers correctly, I
streamlined the 32-bit version so that the products of strlen(), the
start and length of the message, were already in the registers when I
issued my syscall to WRITE().  I'm sure this is, in some ways, *bad*
assembly, but I'm not (yet) an ASM stylist.
2018-04-27 16:44:37 -07:00
Elf M. Sternberg 127e5c0b71 FEAT Added subroutines to the list of skills taught in this tutorial. 2018-04-27 13:34:02 -07:00
Elf M. Sternberg 3b1f0e9a3d DOC Added license and acknowledgements 2018-04-25 21:03:02 -07:00
Elf M. Sternberg 323e46ade1 DOCS added a ton of comments for Lessons 2 and 3. 2018-04-25 20:42:39 -07:00
Elf M. Sternberg aaed91113c FEAT 32 and 64-bit SYS_WRITE calls, one by length, the other with strlen. 2018-04-25 19:40:23 -07:00
Elf M. Sternberg f1328af5d6 Working and commented. 2018-04-25 08:41:35 -07:00
Elf M. Sternberg 4a7fa5a427 Hello world (with proper exit), in 32 and 64 bit implementations. 2018-04-25 07:56:08 -07:00
Elf M. Sternberg b5503dad30 Initial commit 2018-04-25 07:55:13 -07:00