Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/09/04 16:28
Read: times


 
#77145 - RE: Purpose of OS/Relocatable code
Responding to: ???'s previous message
I'd see the OS less like a "father over all the programs" and more like a bunch of library routines that make your life easier but can be thoroughly ignored if you wish so. Plus some kind of shell to allow loading software and can be disposed of when the program is loaded.


I think we're going to have a design disagreement here since you've mentioned this approach at least twice now.

I think the OS should be loaded into code RAM when the system is booted and it should remain in memory thereafter. Some kind of shell must be resident to load and unload programs. Once a program is loaded the OS still must remain resident to, as you said, provide library routines that the program should call.

All access to the hardware should be through the OS and programs should not avoid the OS in an attempt to speed things up. Instead we should design the OS to be as efficient as possible for the vast majority of cases so there is no reason to circumvent the OS in the first place.

Circumventing the OS routines was about the most commonly used method of speeding things up.


It was also the most common reason for programs to fail on new hardware that included new versions of the OS or had different hardware. I think we need to design the OS in such a way as to provide the raw functionality that programmers will need and remove any motivation for them to circumvent the OS.

Especially if we're going to design as much modularity and expandability into this as we've been discussing. The only way to achieve this reliably is if programs commit to using the OS. An expandable and flexible platform that can have any combination of devices attached to it that software programs try to access by circumventing the OS is a recipe for disaster.

One other point is the issue of relocatable code. If the OS is stored at the bottom of memory and programs are loaded immediately following the OS in code RAM then the programs could conceivably be loaded anywhere in memory. LJMPs to specific addresses in the program will fail since the program may not be loaded where the assembler thought it would.

This could be resolved by having all programs have the first two bytes indicate the length of the *CODE* in the program being loaded. Those two bytes would immediately be followed by the assembled code itself with no embedded data, with all non-instruction data contained at the end of the file. The OS program loader would then automatically adjust absolute addresses in the code area of the program. The non-instruction data would not be adjusted, of course. AJMPs and ACALLs could not be used in user programs since programs could be relocated to areas of memory that cross 2k boundaries.

The other solution is to have the OS occupy code RAM from 0000h-0050h (init/ISR vectors) and then high code RAM (48k+ or whatever). This is what the Ataris did. Then the OS loads into the top of memory while all user programs must always begin at 0050h. That way LJMPs and LCALLs in the user program will always work since the program ORG is always known to be 0050h. The downside to this is only one program can be running at a time. You couldn't very well have anything like TSRs.

Regards,
Craig Steiner


List of 177 messages in thread
TopicAuthorDate
Atari 400/800 implementation with 8052            01/01/70 00:00      
   RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
      Sorry...            01/01/70 00:00      
   RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
   RE: Atari 400/800 implementation with 80            01/01/70 00:00      
   RE: Atari 400/800 implementation with 80            01/01/70 00:00      
   Microprocesor emulator?            01/01/70 00:00      
      RE: Microprocesor emulator?            01/01/70 00:00      
         RE: Microprocesor emulator?            01/01/70 00:00      
         RE: Microprocesor emulator?            01/01/70 00:00      
            6502 emulation            01/01/70 00:00      
               RE: 6502 emulation            01/01/70 00:00      
                  RE: 6502 emulation            01/01/70 00:00      
         RE: Microprocesor emulator?            01/01/70 00:00      
            RE: Microprocesor emulator?            01/01/70 00:00      
               RE: Microprocesor emulator?            01/01/70 00:00      
               RE: Microprocesor emulator?            01/01/70 00:00      
                  RE: Microprocesor emulator?            01/01/70 00:00      
                  RE: Microprocesor emulator?            01/01/70 00:00      
                     RE: Microprocesor emulator?            01/01/70 00:00      
                        RE: Microprocesor emulator?            01/01/70 00:00      
      RE: Microprocesor emulator?            01/01/70 00:00      
         RE: Microprocesor emulator?            01/01/70 00:00      
   RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
      RE: Atari 400/800 implementation with 80            01/01/70 00:00      
   RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
   Video output with 8052?            01/01/70 00:00      
      VGA?            01/01/70 00:00      
      RE: Video output with 8052?            01/01/70 00:00      
         RE: Video output with 8052?            01/01/70 00:00      
         RE: Video output with 8052?            01/01/70 00:00      
            RE: Video output with 8052?            01/01/70 00:00      
            RE: Video output with 8052?            01/01/70 00:00      
   RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
      RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
      RE: Atari 400/800 implementation with 80            01/01/70 00:00      
         Do we really need 6502 emulation?            01/01/70 00:00      
            RE: Do we really need 6502 emulation?            01/01/70 00:00      
               RE: Do we really need 6502 emulation?            01/01/70 00:00      
                  I'm game!            01/01/70 00:00      
                     RE: I'm game!            01/01/70 00:00      
                        RE: I'm game!            01/01/70 00:00      
                           RE: I'm game!            01/01/70 00:00      
                              RE: I\'m game!            01/01/70 00:00      
                                 RE: I\'m game!            01/01/70 00:00      
   8052-based video or off-chip solution            01/01/70 00:00      
      RE: 8052-based video or off-chip solutio            01/01/70 00:00      
      RE: 8052-based video or off-chip solution            01/01/70 00:00      
         RE: 8052-based video or off-chip solution            01/01/70 00:00      
         RE: 8052-based video or off-chip solution            01/01/70 00:00      
      My My...Where is the OLD spirit?            01/01/70 00:00      
   RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
      LCD?            01/01/70 00:00      
         RE: LCD?            01/01/70 00:00      
            RE: LCD motiv?            01/01/70 00:00      
   Revisiting video & emulation            01/01/70 00:00      
      RE: Revisiting video & emulation            01/01/70 00:00      
         RE: Revisiting video & emulation            01/01/70 00:00      
            RE: Revisiting video & emulation            01/01/70 00:00      
            RE: Revisiting video & emulation            01/01/70 00:00      
               RE: Revisiting video & emulation            01/01/70 00:00      
                  RE: Revisiting video & emulation            01/01/70 00:00      
                  RE: Revisiting video & emulation            01/01/70 00:00      
      RE: Revisiting video & emulation            01/01/70 00:00      
         RE: Revisiting video & emulation            01/01/70 00:00      
            RE: Revisiting video & emulation            01/01/70 00:00      
               RE: Revisiting video & emulation            01/01/70 00:00      
                  RE: Revisiting video & emulation            01/01/70 00:00      
                     RE: Revisiting video & emulation            01/01/70 00:00      
                        RE: Revisiting video & emulation            01/01/70 00:00      
                           RE: Revisiting video & emulation            01/01/70 00:00      
                              Phillip implements 8052 video            01/01/70 00:00      
                                 RE: Phillip implements 8052 video            01/01/70 00:00      
                                    Phillip video user page            01/01/70 00:00      
                                       RE: Phillip video user page            01/01/70 00:00      
                                          Silabs as video chip            01/01/70 00:00      
                                             RE: Silabs as video chip            01/01/70 00:00      
                                       RE: Phillip video user page            01/01/70 00:00      
                                          RE: Phillip video user page            01/01/70 00:00      
                                             RE: Phillip video user page            01/01/70 00:00      
                              RE: Revisiting video & emulation            01/01/70 00:00      
   WHY?            01/01/70 00:00      
      RE: WHY?            01/01/70 00:00      
      None of the above            01/01/70 00:00      
   Programmable logic again            01/01/70 00:00      
   Defining the project & new ideas            01/01/70 00:00      
      RE: Defining the project & new ideas            01/01/70 00:00      
      RE: Defining the project & new ideas            01/01/70 00:00      
         RE: Defining the project & new ideas            01/01/70 00:00      
            RE: Defining the project & new ideas            01/01/70 00:00      
               RE: Defining the project & new ideas            01/01/70 00:00      
      RE: Defining the project & new ideas            01/01/70 00:00      
         RE: Defining the project & new ideas            01/01/70 00:00      
            RE: Defining the project & new ideas            01/01/70 00:00      
               RE: Defining the project & new ideas            01/01/70 00:00      
                  RE: Defining the project & new ideas            01/01/70 00:00      
                     RE: Efficiency            01/01/70 00:00      
                        RE: Efficiency            01/01/70 00:00      
                           RE: Efficiency            01/01/70 00:00      
                              RE: Efficiency            01/01/70 00:00      
                                 RE: Purpose of OS/Relocatable code            01/01/70 00:00      
                                    RE: Purpose of OS/Relocatable code            01/01/70 00:00      
                                       RE: Purpose of OS/Relocatable code            01/01/70 00:00      
                                          RE: Purpose of OS/Relocatable code            01/01/70 00:00      
                     RE: Defining the project & new ideas            01/01/70 00:00      
                        RE: Defining the project & new ideas            01/01/70 00:00      
                     RE: Defining the project & new ideas            01/01/70 00:00      
   Take a look            01/01/70 00:00      
   Starting specifications?            01/01/70 00:00      
      RE: Starting specifications?            01/01/70 00:00      
         I2C vs. parallel bus            01/01/70 00:00      
      RE: Starting specifications?            01/01/70 00:00      
         RE: Serial vs. parallel internal bus            01/01/70 00:00      
            RE: Serial vs. parallel internal bus            01/01/70 00:00      
      Then parallel..            01/01/70 00:00      
   RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
      Re: Architecture questions            01/01/70 00:00      
      RE: Atari 400/800 implementation with 80            01/01/70 00:00      
         RE: Atari 400/800 implementation with 80            01/01/70 00:00      
            RE: Atari 400/800 implementation with 80            01/01/70 00:00      
               RE: Atari 400/800 implementation with 80            01/01/70 00:00      
                  RE: Atari 400/800 implementation with 80            01/01/70 00:00      
   Proposal: Internal Data Bus            01/01/70 00:00      
      RE: Proposal: Internal Data Bus            01/01/70 00:00      
         RE: Proposal: Internal Data Bus            01/01/70 00:00      
            RE: Command/Data line            01/01/70 00:00      
               RE: Command/Data line            01/01/70 00:00      
                  RE: Command/Data line            01/01/70 00:00      
                     RE: just recalled another            01/01/70 00:00      
                        RE: just recalled another            01/01/70 00:00      
                     RE: Alternative bus strategies            01/01/70 00:00      
         RE: Proposal: Internal Data Bus            01/01/70 00:00      
      RE: Proposal: Internal Data Bus            01/01/70 00:00      
         RE: Proposal: Internal Data Bus            01/01/70 00:00      
            RE: Proposal: Internal Data Bus            01/01/70 00:00      
               RE: Proposal: Internal Data Bus            01/01/70 00:00      
                  RE: Proposal: Internal Data Bus            01/01/70 00:00      
                     RAM quantity & Interrupts            01/01/70 00:00      
                        RE: RAM quantity & Interrupts            01/01/70 00:00      
      Where's the memory?            01/01/70 00:00      
         RE: Shared memory as the data bus?            01/01/70 00:00      
         RE: Where\'s the memory?            01/01/70 00:00      
            RE: Multiport/DMA limitations            01/01/70 00:00      
               RE: Multiport/DMA limitations            01/01/70 00:00      
                  DMA on the Atari            01/01/70 00:00      
                     RE: DMA on the Atari            01/01/70 00:00      
                        RE: DMA on the Atari            01/01/70 00:00      
                           RE: DMA on the Atari            01/01/70 00:00      
                           RE: DMA on the Atari            01/01/70 00:00      
               RE: Multiport/DMA limitations Yes But..            01/01/70 00:00      
   Future of this project            01/01/70 00:00      
      RE: Future of this project            01/01/70 00:00      
         Purpose of the project            01/01/70 00:00      
            RE: Purpose of the project            01/01/70 00:00      
         RE: Future of this project            01/01/70 00:00      
      RE: Future of this project            01/01/70 00:00      
      RE: Future of this project            01/01/70 00:00      
         RE: Future of this project            01/01/70 00:00      
      RE: Future of this project            01/01/70 00:00      
   RE: Atari 400/800 implementation with 80            01/01/70 00:00      
      RE: Atari games on CD            01/01/70 00:00      
   RE: Multiprocessing/ebay/vintage_puters            01/01/70 00:00      
   RE: Karas the Big Party Pooper            01/01/70 00:00      
      That's the point            01/01/70 00:00      
      RE: Karas the Big Party Pooper            01/01/70 00:00      
         RE: Karas the Big Party Pooper            01/01/70 00:00      
            RE: Karas the Big Party Pooper            01/01/70 00:00      
               RE: in a grid            01/01/70 00:00      
                  RE: in a grid            01/01/70 00:00      
                     RE: in a grid            01/01/70 00:00      
                        RE: in a grid            01/01/70 00:00      
                           RE: in a grid            01/01/70 00:00      
      RE: Karas the Big Party Pooper            01/01/70 00:00      
         RE: Karas the Big Party Pooper            01/01/70 00:00      
   RE: Atari 400/800 implementation with 8052            01/01/70 00:00      
   About the multiprocessor scheme            01/01/70 00:00      
   Home built 8051 computer??            01/01/70 00:00      

Back to Subject List