Skip to content

ashwinashok9111993/victor-nasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gas - assembler

refer to the code examples here:

http://www.wrox.com/WileyCDA/WroxTitle/Professional-Assembly-Language.productCd-0764579010,descCd-DOWNLOAD.html

for 64 bit

assemble:

as basic.s -o basic.o --32 --gstabs -mtune=i386

link:

ld basic.o -o basic -mi386

for 32 bit

assemble:

as basic.s -o basic.o --32 --gstabs

link:

ld basic.o -o basic

if you are using external functions

link using

gcc basic.o -o basic

victor-nasm

A repository for assembly code examples

to assemble use the following commands

for 32-bit LINUX

nasm -f elf32 -l hello.lst hello.asm

ld -o hello hello.o

replace hello with source file

for 64-bit LINUX

nasm -f elf64 -l hello.lst hello.asm

ld -o hello hello.o

replace hello with source file

Please refer GDB usage here

http://www.akira.ruc.dk/~keld/teaching/CAN_e13/Readings/gdb.pdf

to work with gdb

gdb <.asm>

prompt]$ gdb hello

(gdb) break _start

here is where the program starts

(gdb) run

run till _start is reached

(gdb) si

step one instruction

(gdb) info registers

read register data

repeat last two gdb steps till end of program

About

A repository for assembly code examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published