Developing a bootloader

19 views
Skip to first unread message

Riya Gayasen

unread,
Feb 28, 2014, 5:29:05 PM2/28/14
to wncc...@googlegroups.com
Hi Everyone, 

I am working on a boot loader on assembly language on NASM (Netwide Assembler, int86). Right now, I can do some simple stuff (like displaying a text at boot, etc. ). Does anyone know how to load a  C code from a NASM code during boot?

Thanks
Riya

Dilawar Singh

unread,
Mar 1, 2014, 8:07:45 AM3/1/14
to wncc_iitb
16 bit C-Code calling is explained in their manual. They also have an example for 32 bit. Another approach could be write C code and turn is to assembly and link them together. But this might lead to surprises..

http://www.csee.umbc.edu/portal/help/nasm/sample.shtml
Also http://cs.lmu.edu/~ray/notes/nasmexamples/

gcc has an option -masm which can write the C program to assembly. Check if some version of gcc supports your format. The nasm say that it has intel like syntax. So quickly try with -masm=intel to to turn C -> your formal and link it with main program.

- Dilawar



--
--
The website for the club is http://wncc-iitb.org/
To post to this group, send email to wncc...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wncc_iitb+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Dilawar
NCBS Bangalore
Reply all
Reply to author
Forward
0 new messages