You'll have to invoke the thread library for your platform from the ASM. To do this you'll have to learn the ABI for your platform and tell the linker of the appropriate library to use.
Best way to do it is do something similar to what you want from C and then tell your compiler to output ASM rather than binary code. This will give you some indication of what the ABI for the platform is.
Thank you. I have to learn C or C++ or C# or maybe Java then.. Out of everything in the programming language, I only understand assembler for x86 and x51. Kind of dino thing. Thanks
You can easily mix the two. GCC uses GASS, its own version of an asm compiler. It supports _asm_ and asm inline.
You can also always write the majority of your program in asm and then just use a custom linker script to link it to a compiled c source. (C++ has extra runtime components and is in all likely hood harder to link, never tried [ Even the entry has a 8bit offset doesn't it? ] Same with C#)
The only problem with GAS is that it uses AT&T ASM rather than Intel.
Thanks, my programing work is mainly firmware programming, using standard PC. Therefore no OS or such, directly load from bios (int 19). Using C++ or C# are major problems for me. Therefore I need tutorial direct implementation from asm for multi processor. Just bought Q6600 cheap quad to test.
If you are working on the bare metal then you will have to implement the process model yourself to get threading. You can make it work however which way you want then.
Yes, that the way I like it. I already found out that using APIC to set the other cores. Now need to find out, the next step. Any pointer will be really appreciated. Thanks
I think your best option is looking up the basic theory behind threaded processing in OS design. You are, after all, talking about implementing part of an OS.
I think Intel created a thread library when they started shipping core duos. That might be of interest.
Yeah, thanks. Still slowly and painfully trying to understand the programmer manual from Intel and AMD.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks