Skip to content

Commit 9b90eae

Browse files
committed
Remove a bunch of useless lib/common.asm functions
These were legacy from a previous tutorial I was based on once upon a time. Now all libs (x86-64) only have a minimum set of functions, basically to support ASSERT_FAIL. All the rest was for visibility and can be done more easily with GDB... I was such a newb :-) Some of the removed functionality was for portability with 50 Windows assemblers, but since I don't feel like porting properly, and no one will ever send pull requests, I'm just removing that untested stuff for now.
1 parent 7dd5b15 commit 9b90eae

12 files changed

Lines changed: 50 additions & 580 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ x86 IA-32 and x86-64 userland minimal examples tutorial. Hundreds of runnable as
9494
1. [cdecl examples](cdecl.asm)
9595
1. [stdcall](stdcall.asm)
9696
1. [Linux](linux/)
97+
1. Infrastructure
98+
1. [lib_test](lib_test.asm)
9799
1. [x86-64](x86-64/)
98100
1. x86_64 general principles
99101
1. [cmp sign extend](x86_64/cmp-sign-extend.asm)
@@ -128,8 +130,7 @@ x86 IA-32 and x86-64 userland minimal examples tutorial. Hundreds of runnable as
128130
1. [ljmp](gas/ljmp.md)
129131
1. [cbtw](gas/cbtw.S)
130132
1. [movz](gas/movz.S)
131-
1. Similar to asm
132-
1. [push](gas/push.S)
133+
1. [push](gas/push.S)
133134
1. Directives
134135
1. [.ascii](gas/ascii.S)
135136
1. [.asciz](gas/asciz.S)
@@ -145,6 +146,8 @@ x86 IA-32 and x86-64 userland minimal examples tutorial. Hundreds of runnable as
145146
1. [.altmacro](gas/altmacro.S)
146147
1. [.irp](gas/irp.S)
147148
1. [Comments](gas/comments.md)
149+
1. Infrastructure
150+
1. [lib_test](gas/lib_test.S)
148151
1. [Bibliography](gas/bibliogrpahy.md)
149152
1. [NASM](nasm/)
150153
1. [RAM](nasm/ram.asm)

gas/lib_test.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#include "lib/common_gas.h"
2+
ENTRY
3+
mov $12345678, %eax
4+
call print_int
5+
EXIT

gas/push.S

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/*
2-
# push
3-
4-
# pop
5-
*/
6-
71
#include "lib/common_gas.h"
82

93
.data

lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: all clean
22

33
all:
4-
$(NASM) -dELF_TYPE -o common$(OBJ_EXT) common.asm
4+
$(NASM) -o common$(OBJ_EXT) common.asm
55
$(CC) $(CFLAGS) -o driver$(OBJ_EXT) -c driver.c
66

77
clean:

0 commit comments

Comments
 (0)