how do you do this? if I have no os, and want to do a simple os with a while loop (a forever loop in HLA), how does the os know to run the dll?
-
-
oops - I'm sorry - how does the board know what dll to run? I guess it would be, how does the first steps of instructions load into the processor?
-
Nata1 wrote:how do you do this? if I have no os, and want to do a simple os with a while loop (a forever loop in HLA), how does the os know to run the dll?
If there is no OS how does the OS get it to run? What? DLL? :O
You write the loop to the bootable part of a floppy disk and the bios will run it for you... -
ahhh - ok. I've never understood what the bios is exactly -
what kind of bios do you think the 8051 has? -
The bios has a generic address on the IO (hard drives, floppy drives) that it runs, it is hard coded. Like "Start executing at 0x000100" for example.
And a DLL is a Windows file type, what you are talking about is a RAW or BIN file with no header information, just executable code.
I know nothing about the 8051, I am still getting to grips with the 8086. -
Nata1 wrote:ahhh - ok. I've never understood what the bios is exactly -
what kind of bios do you think the 8051 has?
It's been a very long time since I programmed an 8051, but IIRC, the 8051 starts executing instructions at address zero after it powers up. So you need to write a bootstrap loader that begins at that address and loads the operating system from whatever periphrial device you are using. Hopefully, someone supplied you with a set of libraries to do this. Otherwise, get ready for some very long nights.
-
Beer28 wrote:Just use int main() from your SDCC C code, compile that to hex, and use atmel flip to load it on your eeprom on the board via the serial cable.
it will start executing right at your main block
int main() {
// bootstraps instruction pointer to this address in compiled hex
}
It's that easy.
It is that easy when you neglect 98% of the details....
Develop Windows:
1. Write code
2. Compile
3. Release
It is *THAT* easy....
PS - "Compile to hex" ... wtf? That doesn't make any sense! -
I remember you saying something about that - so the bios will look in the eeprom - do they even have a bios?
Is a bios a burned in OS in a way? Of course I know what a bios does! but I'm trying to understand at a low level what it is
well, this looks fairly easy. I'm having a blast with HLA btw - I haven't had this much fun in a long time - I didn't even know what a register was before today (well, I still don't but I know how to use some of them)
-
Manip, I think that its a SDCC option - but I'm not planning on using the SDCC but the assembler that comes with it
(ok, I'm going to cheat and put all the assembly inline in C)
-
I can open stuff using RadASM in Hex, think I could write my dll in C, and then open it in Hex, save it as a text file, and use that?
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.