4 ms·
I don't know if I'm the right guy to answer this, but I've written a lot of assembly on the side as part of VM and emulation projects. I think the first time I
by fwsgonzo 5y ago
I don't know if I'm the right guy to answer this, but I've written a lot of assembly on the side as part of VM and emulation projects. I think the first time I really understood how simple some things can be was when I wrote a simple function that did nothing but returned back to the caller.
So, how about starting out with a C program that enters main, calls an extern assembly function and then exits?
And this would be the example C code:
int main() {
extern void my_assembly_function();
my_assembly_function();
}
Now you have to create your assembly file, and then compile it to an object file that can be linked with your program:
gcc -c myassembly.S -o myassembly.o
OR
nasm -f elf64 myassembly.asm -o myassembly.o
See: https://www.ele.uva.es/~jesman/BigSeti/seti1/nasm/nasmdoc2.html https://www.ele.uva.es/~jesman/BigSeti/seti1/nasm/nasmdoc2.h...
I've never used TASM before and I couldn't really find anyone using it. But I guess the course will cover that. Is this programming on Windows or Linux?
- qayxc 5y ago> Is this programming on Windows or Linux? Considering that it's TASM it's good old DOS.