Click here to Skip to main content
15,887,175 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Notification Hell Pin
Greg Utas15-May-20 8:43
professionalGreg Utas15-May-20 8:43 
GeneralRe: Notification Hell Pin
ZurdoDev15-May-20 8:46
professionalZurdoDev15-May-20 8:46 
GeneralRe: Notification Hell Pin
Greg Utas15-May-20 9:00
professionalGreg Utas15-May-20 9:00 
GeneralRe: Notification Hell Pin
ZurdoDev15-May-20 9:02
professionalZurdoDev15-May-20 9:02 
GeneralRe: Notification Hell Pin
Greg Utas15-May-20 9:20
professionalGreg Utas15-May-20 9:20 
GeneralRe: Notification Hell Pin
ZurdoDev15-May-20 9:25
professionalZurdoDev15-May-20 9:25 
GeneralRe: Notification Hell Pin
Greg Utas15-May-20 9:47
professionalGreg Utas15-May-20 9:47 
GeneralHow would you slice up this turkey? Pin
CodeWraith15-May-20 2:43
CodeWraith15-May-20 2:43 
Remember the good old 8086 and how it used its segment registers? Essentially I'm doing something like that on an 8 bit computer right now and can then address up to 16 megabytes. Unfortunately my segment registers will not be part of the CPU, so there will be no automatic address calculations during interrupts, DMA, subroutine calling or even normal branching. The computer is still confined too much in its regular 64k address space.

That's why I have no choice than to slice up this address space into smaller segments which can be switched individually. With a little care the segments then can be switched around without an instant crash.

The big question now is what sorts of segments are most practical and how big they should be. Let's look at the 8086 segment registers for inspiration.

The stack segment: As I said, the stack should not be switched away. Let's also throw in interrupt routines and DMA buffers. Would that not be a waste of expanded memory if only one page in this segment is used? No. Every process would get its own page and (when interrupts and DMA are disabled) the OS can map in I/O ports, video memory or keep track of its processes and memory management.

The code segment: I can emulate a full MMU in software when calling subroutines. That means I can call code in any page of the code segment at any time without problems. The code in every page would have the character of a module, a DLL if you want. I could call the subroutines by an ordinal instead of addresses, add memory management on the code segment and (with a proper storage device) even implement virtual memory, just in time loading of these modules or even just in time compilation. Quite advanced for a little 8 bit computer.

The data segment: Very nice to have, but only at a cost. Pros: Your programs get access to much more memory than they would without it. Also, this segment is a good alternative to access I/O and video memory if you can't do that on the stack segment for some reason. Con: The code segment gets smaller.

This is my current mix:

0000 - 7FFF code segment (32k)
8000 - BFFF data segment (16k)
C000 - FFFF stack segment (16k)

Any better ideas which might work better? Have I forgotten something? If i make a bad decision now, I will have to live with it for a long time.
I have lived with several Zen masters - all of them were cats.

His last invention was an evil Lasagna. It didn't kill anyone, and it actually tasted pretty good.

GeneralRe: How would you slice up this turkey? Pin
OriginalGriff15-May-20 4:05
mveOriginalGriff15-May-20 4:05 
GeneralRe: How would you slice up this turkey? Pin
CodeWraith15-May-20 6:08
CodeWraith15-May-20 6:08 
GeneralRe: How would you slice up this turkey? Pin
lopatir15-May-20 4:15
lopatir15-May-20 4:15 
GeneralRe: How would you slice up this turkey? Pin
CodeWraith15-May-20 6:39
CodeWraith15-May-20 6:39 
GeneralRe: How would you slice up this turkey? Pin
kalberts15-May-20 5:07
kalberts15-May-20 5:07 
GeneralRe: How would you slice up this turkey? Pin
fd975015-May-20 6:25
professionalfd975015-May-20 6:25 
GeneralRe: How would you slice up this turkey? Pin
CodeWraith15-May-20 8:49
CodeWraith15-May-20 8:49 
GeneralRe: How would you slice up this turkey? Pin
Rick York15-May-20 6:01
mveRick York15-May-20 6:01 
GeneralRe: How would you slice up this turkey? Pin
kalberts15-May-20 8:44
kalberts15-May-20 8:44 
GeneralRe: How would you slice up this turkey? Pin
Rick York15-May-20 10:13
mveRick York15-May-20 10:13 
GeneralRe: How would you slice up this turkey? Pin
CodeWraith15-May-20 11:34
CodeWraith15-May-20 11:34 
GeneralRe: How would you slice up this turkey? Pin
Luc Pattyn15-May-20 7:34
sitebuilderLuc Pattyn15-May-20 7:34 
GeneralPomodoro Apps Pin
Brady Kelly15-May-20 1:48
Brady Kelly15-May-20 1:48 
GeneralRe: Pomodoro Apps Pin
musefan15-May-20 2:43
musefan15-May-20 2:43 
GeneralRe: Pomodoro Apps Pin
W Balboos, GHB15-May-20 2:46
W Balboos, GHB15-May-20 2:46 
GeneralRe: Pomodoro Apps Pin
musefan15-May-20 2:51
musefan15-May-20 2:51 
GeneralRe: Pomodoro Apps Pin
W Balboos, GHB15-May-20 2:58
W Balboos, GHB15-May-20 2:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.