Skip to content

Instantly share code, notes, and snippets.

View rahatzamancse's full-sized avatar

Rahat Zaman rahatzamancse

View GitHub Profile
@rahatzamancse
rahatzamancse / Makefile
Created September 11, 2020 23:49
Recast a simple C program's invocation of system calls from general glibc interface to x86_64 assembly language
build:
nasm -o fork_exec_wait_exit.o -f elf64 fork_exec_wait_exit.nasm
ld -e _start --stats -o fork_exec_wait_exit fork_exec_wait_exit.o
run: build
./fork_exec_wait_exit
clean:
rm -rf *.o fork_exec_wait_exit
@rahatzamancse
rahatzamancse / BCDtoHex.asm
Created June 28, 2020 01:32
An assembly code for converting BCD code to Hexadecimal and store them in memory. This is run on 8086 microprocessor.
;CALL scan_num ; CX.
;CALL pthis
;DB 'A string', 0
;CALL print_num ; AX.
include 'emu8086.inc'
ORG 100h
jmp start
value dw ?
digits dw ?,?,?,?
result dw 0