eeguru
Veteran Member
Last night I managed to block out some time to work on a bit of BIOS code for the JR-IDE card. It really brought me back to a place I wasn't expecting. With modern CPUs we completely take for granted caching, pipe-lining, prefetch, high clock rates, and even things as simple as 32-bit wide busses. With the 4.77 MHz 8088, I was freshly reminded each instruction is multiple bytes long. Each byte of the instruction must be fetched one bus cycle at a time. Each bus cycle takes 4-7 clocks. Instruction decode, setup, and execution takes anywhere from 2 to 40 clocks. Then each output result must be stored back one bus cycle and 4-7 clocks at a time. 4.77 million clocks a second evaporates quick when everything is a geometric divide.
Most of us are well aware of these facts. I certain was and am after 30 years of doing this. However I don't think I was really 'in-tune' with it till I found myself actually writing code where eliminating a few instructions or even shortening the encoding of what you are trying to accomplish really became visible in human time. There was a time in my youth where I was a bit sharper and I really viewed C as an assembly macro-language that was more maintainable than raw assembly. I was very intimate with both Watcom and GNU compilers and could see ahead the generated assembly in my brain much like Cypher could see brunettes in the Matrix. Last night, at least somewhat, brought me back to that place. Was a bit like scrunching my toes in the sand on my favorite beach I only get to visit once a decade.
Was good stuff. And great to have fresh perspective in my day to day.
Most of us are well aware of these facts. I certain was and am after 30 years of doing this. However I don't think I was really 'in-tune' with it till I found myself actually writing code where eliminating a few instructions or even shortening the encoding of what you are trying to accomplish really became visible in human time. There was a time in my youth where I was a bit sharper and I really viewed C as an assembly macro-language that was more maintainable than raw assembly. I was very intimate with both Watcom and GNU compilers and could see ahead the generated assembly in my brain much like Cypher could see brunettes in the Matrix. Last night, at least somewhat, brought me back to that place. Was a bit like scrunching my toes in the sand on my favorite beach I only get to visit once a decade.
Was good stuff. And great to have fresh perspective in my day to day.