This file contains 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
# Example adapted from http://www.ibm.com/developerworks/library/l-gas-nasm/ | |
# Assemble with: as --gstabs+ -o nasm2gas5.o nasm2gas5.s | |
# Link with: ld --dynamic-linker /lib/ld-linux.so.2 -lc -o nasm2gas5 nasm2gas5.o | |
# | |
# Support intel syntal vs. ATT and don't use % before register names | |
.intel_syntax noprefix | |
.section .data | |
# Command table to store at most 10 command line arguments |
This file contains 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
# Example adapted from http://www.ibm.com/developerworks/library/l-gas-nasm/ | |
# Assemble with: as --gstabs+ -o nasm2gas4.o nasm2gas4.s | |
# Link with: ld --dynamic-linker /lib/ld-linux.so.2 -lc -o nasm2gas4 nasm2gas4.o | |
# | |
# Support intel syntal vs. ATT and don't use % before register names | |
.intel_syntax noprefix | |
.section .data | |
array: .byte 89, 10, 67, 1, 4, 27, 12, 34, 86, 3 |
This file contains 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
# Example adapted from http://www.ibm.com/developerworks/library/l-gas-nasm/ | |
# Assemble with: as --gstabs+ -o nasm2gas3.o nasm2gas3.s | |
# Link with: ld -o nasm2gas3 nasm2gas3.o | |
# | |
# Support intel syntal vs. ATT and don't use % before register names | |
.intel_syntax noprefix | |
.section .rodata | |
prompt_str: .ascii "Enter Your Name: \n" |
This file contains 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
# Example adapted from http://www.ibm.com/developerworks/library/l-gas-nasm/ | |
# Assemble with: as --gstabs+ -o nasm2gas2.o nasm2gas2.s | |
# Link with ld -o nasm2gas2 nasm2gas2.o | |
# Check program return status with "echo $?" | |
# | |
# Support intel syntal vs. ATT and don't use % before register names | |
.intel_syntax noprefix | |
.section .data |
This file contains 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
# Example adapted from http://www.ibm.com/developerworks/library/l-gas-nasm/ | |
# Assemble with: as --gstabs+ -o nasm2gas1.o nasm2gas1.s | |
# Link with: ld -o nasm2gas1 nasm2gas1.o | |
# Check program return status with "echo $?" | |
# | |
# Support intel syntal vs. ATT and don't use % before register names | |
.intel_syntax noprefix | |
.section .text |