This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PURPOSE: This program displays the contents of an input file | |
# to the standard error | |
# | |
# Processing: | |
# 1) Open the input file | |
# 2) While we're not at the end of the input file | |
## a) read part of file into our memory buffer | |
## b) write the memory buffer to the standard error | |
# | |
# To run: From the command line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; nasm -felf64 hello_world.asm && ld hello_world.o -o hello_world && ./hello_world | |
; this from https://github.com/hackclub/some-assembly-required/tree/main/code/x86-intel | |
; I added some comment to indicate my understanding. | |
global _start | |
section .text | |
_start: | |
; all of this just to tell the operating system to write to the stdout. |