Re:The descent to C
by waps on Tuesday January 28, 2014 @10:26AM
(#7137563)
Example of absolute array:
var
EGAVGAScreen : Array[0..41360] of Byte absolute $A000:0000;
Et voila : bounds-checked memory mapped hardware access.
(note: the very well known "Crt" unit uses a memory mapped video buffer like this. So if you programmed a turbo pascal program, chances were good it was using this trick for screen output. Advantage : the speed is unbeatable)
var EGAVGAScreen : Array[0..41360] of Byte absolute $A000:0000;
Et voila : bounds-checked memory mapped hardware access.
(note: the very well known "Crt" unit uses a memory mapped video buffer like this. So if you programmed a turbo pascal program, chances were good it was using this trick for screen output. Advantage : the speed is unbeatable)