Last active
December 9, 2024 12:30
-
-
Save KarimullinArthur/c985518ee78db285d9c9dd3473d769c6 to your computer and use it in GitHub Desktop.
Makefile for learn asm
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
tui enable | |
layout regs | |
list | |
tui window height src +5 | |
break _start | |
run | |
target record-full | |
list 0 |
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
bit = 32 | |
ifeq ($(bit), 32) | |
elf = i386 | |
endif | |
ifeq ($(bit), 64) | |
elf = x86_64 | |
endif | |
ifeq ($(bit), 32) | |
elf = i386 | |
endif | |
run: | |
nasm -f elf$(bit) $p -o program.o && ld -m elf_$(elf) program.o -o program && echo && ./program; echo | |
gdb: | |
echo | |
nasm -g -f elf$(bit) $p -o program.o && ld -m elf_$(elf) program.o -o program && echo && gdb ./program -x ./gdbscript |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment