Skip to content

duythien0912/asm-encoding-decoding

Repository files navigation

Project #5

Given an encoding scheme:

schema

Develop encoding / decoding functions in assembly, write C program to encode a file, use a decoding function to check the encoding functionality. Compare the time taken to encode/decode a large file in C and Assembly language.

Run this project

This project running on Ubuntu 16.04.6 LTS (Xenial Xerus) 64bit

The command line may require adjusting for other models

IMAGE ALT TEXT HERE

Tutorial:

Build object and list of data file from assembly file

nasm -g -f elf64 tv.asm -l tv.lst

Create object file result.o from assembly file tv.o and c.c file

gcc -g -m64 -o result.o c.c tv.o

Run file and check result

./result.o

Quick run

gcc -g -m64 -o encode.o encode.c tv.o && gcc -g -m64 -o decode.o decode.c tv.o && ./encode.o && ./decode.o

Quick run cach2

rm -rf myfile_encode.txt && rm -rf myfile_decode.txt && nasm -g -f elf64 tv.asm -l ror.lst -o ror.o && gcc -g -m64 -o test ./cach2.c ror.o && ./test myfile.txt myfile_encode.txt myfile_decode.txt 1

About

Develop encoding / decoding functions in assembly, write C program to encode a file, use decoding function to check the encoding functionality. Compare the time taken to encode/decode a large file in C and Assembly language.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors