|
That was a sweet thought, so ignore those who condom it.
"Somehow, Wales always enters into these things - worries about sheep developing tooth decay . . . "
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
I have been designing my little 8 bit computer and now have a memory map that should be adequate.
16k ROM
8k RAM (basic RAM if no paged RAM is present, later fixed RAM that should not be paged away)
6k Video RAM
2k I/O registers
32k Paged RAM (32k pages out of up to 16MB)
Nice, huh? NOT!
The 2k for the I/O registers would allow 16 bytes memory space for each of up to 128 I/O devices. No need to overdo it, but I'm going to need about 16 of them. The problem is that at least six of the planned devices will need interrupts. I don't want to poll for keystrokes, mouse events, bytes coming from the IDE port, bytes coming from the serial port, sound chips having empty buffers...
There is an interrupt controller IC, but it will hog up a 4k area in the memory map (which I don't have) at a fixed place where it really hurts (in the 32k paged RAM). This will not help.
Now what will I do? I could simply use an AND gate with enough inputs to unite the IRQs from all devices. When any one of them goes low, the output of the gate will go low and trigger the interrupt.
Nice and well. The processor will call its interrupt routine - and now what? It does not know which device to service. Any ideas?
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.
|
|
|
|
|
Use your AND gate, and a also wire the interrupts via a latch to a byte in the "device 0" memory space (you may need a latch, it's been a while since I did this kind of thing).
Interrupt fires, read the byte, clear it, you know the interrupt source(s) from the bit pattern.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Good idea. Interrupt priorities could be done in the interrupt routine, but I have to be careful if another interrupt occurs while I'm still servicing one. The interrupt controller would have dealt with all that, but that's really not an option.
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.
|
|
|
|
|
I was thinking the same as OG, 16 IRQ's needs only 4 bits (so the byte could handle up to 256 IRQ's - enough for the future.)
Could be wrong but back in the day I sort of remember when the Z80 caught an IRQ it disabled further interrupts till you executed a particular instruction (or was it a special variant of the RET instruction?) - something like that? (And there may have been 1 or 2 specific IRQs that weren't disabled). Was a loooong time ago, could be wrong, may have been a dream.
Perhaps your CPU has something similar?
Signature ready for installation. Please Reboot now.
|
|
|
|
|
I thought about a 16 -> 4 multiplexer (they are cheap enough), but you can't respond to multiple interrupts that way, so if two come in while you are processing one with interrupts disabled you will lose one or the other when you reenable. A pair of eight bit latches doesn't take a lot more room, and is more flexible.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Brings back memories. Do you have a processor that automatically disables further interrupts when the first interrupt occurs, or is an instruction to disable interrupts? If the former, one workaround I had to implement once was to check at the end of the interrupt handler if any other bits had been set and route them in the code. If the latter, you could either write your IRQ handlers to be really really safe, or you could write an IRQ handler that queues the interrupt and have a separate (does your processor do threading?) "loop" (ugh, but again, been there, done that) that services the queue.
Heck, if you can create a separate thread, don't even use the IRQ line, just poll the latch. As evil as that sounds, it actually works quite well, IIRC. If your processor doesn't support threads, then, ummm...not a great solution.
Anyways, that's my 2c from what I remember having to deal with in a previous lifetime.
|
|
|
|
|
Interrupts are disabled when the processor acknowleges an interrupt and are reenabled when you return from the interrupt routine. Threads would be great, but the processor does not support them. I would need some kind of timer interrupt to schedule and switch threads. This is becoming circular.
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.
|
|
|
|
|
CodeWraith wrote: This is becoming circular.
Otherwise known as "stack overflow" Yup, that about sums up the complexity of interrupts. Simple concept, yet probably where a good 50% (if not more) of my debugging would go into when I used to write assembly.
|
|
|
|
|
are you a wizard?
|
|
|
|
|
I hunt Balrogs every day!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I knew it!
|
|
|
|
|
I suppose then you also have the robe, pointy hat, eat a lot and never bathe.
Signature ready for installation. Please Reboot now.
|
|
|
|
|
Yes, No, Yes, No comment.
Gandalf bathed - how do you think he became Gandalf the White? Eating Tide Pods?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Ah, but on Discworld only he Archchancellor bathed (even then a few times only),
and that worried the rest of the wizards a great deal.
Signature ready for installation. Please Reboot now.
|
|
|
|
|
It worried 'em even more when they found out the bathroom was a Bloody Stupid Johnson creation!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Look over the pond: Chlorox bleach.
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.
|
|
|
|
|
OriginalGriff wrote: I hunt Balrogs every day!
Lucky for us you haven't actually encountered any.
|
|
|
|
|
I dunno - I think there are quite a few in QA!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
I now have a less scary backdrop!
|
|
|
|
|
glennPattonWork wrote: I now have a less scary backdrop!
Quote: ... the 7 light-year diameter bubble offers evidence of violent processes at work. Above and left of the Bubble's center is a hot, O-type star, several hundred thousand times more luminous and some 45 times more massive than the Sun. A fierce stellar wind and intense radiation from that star ...
I wouldn't get too close, it only makes the entire worlds nuclear arsenal look like a fireflies fart.
Signature ready for installation. Please Reboot now.
|
|
|
|
|
I assume that "too close" means, maybe, twenty light years or so?
|
|
|
|
|
I'm sure lots of us receive job postings from many recruiters. I just thought I'd post this one because it made me laugh. 10 years minimum required for many, *very* particular skills?! Let me know if anyone on the planet would qualify. I'll be happy to send the original post if you want to respond
Skills Required
Demonstrated experience working with MS Dynamics Online CRM Platform (current versions preferred) Required 10 years
Experience designing, developing and managing multiple enterprise level CRM applications Required 10 years
Experience creating web services for enterprise MS Dynamics CRM Online applications Required 10 years
Experience with CRM data replication to Microsoft SQL Server Required 10 years
Experience with bi-directional integrations with multiple source systems. Required 10 years
Experience with GIS integration with MS Dynamics Online CRM Platform Required 10 years
Experience with batch document scanning and storing those images in Azure Blob Storage Required 10 years
Must have enterprise application experience in setting up security roles for multi-level (county/state or similar) agencies. Required 10 years
|
|
|
|
|
10 years experience with Azure? Given it hasn't been out for 10 years I guess they're looking for someone involved in its actual development.
|
|
|
|