On , Peter Magnusson wrote to Christian Iversen :
PM> CI> How do you write to a specific byte in memory in Dos??
PM> CI> How do you write to a specific byte in memory in
PM> CI> Windows(95) ??
PM>
PM> I don't understand the question. Sorry.
PM>
PM> CI> Does the video memory start at $A000 on all gfx. cards??
PM>
PM> $A000:0000 or (flat) $000A0000, yes.
Except CGA (cruddy graphics adaptor) B800:0000 amounts vary...
Propriatary graphics on AT's class and up vary on a rare basis...
PM> CI> What is the fastest way (if there are any diffence) to
PM> CI> compary a register with the value zero.
PM>
PM> well, there's OR AL,AL (followed by JZ or JNZ) and JCXZ.
PM> JCXZ is only one instruction, i.e the fastest, but there's
PM> no JCXNZ instruction unfortunatly.
either... OR (8/16bit reg), (against itself) ; 2 bytes, 3 clocks
TEST (8/16bit reg), (against itself) ; 2 bytes, 3 clocks
CMP (8/16bit reg), (against itself ; 2 bytes, 3 clocks
followed by one of many....
J?? ;2 bytes, 4 or 16 clocks depending, limited to 8 bit
displacement for target address.
total.... 4 bytes, 7 to 19 clocks
PM> So OR reg,reg is the shortest way with NZ option.
PM> Otherwise, JCXZ is the fastest, OR and CMP equal speed.
PM> I think.
JCXZ is the exception.... 2 bytes, 6 to 18 clocks....
slower on standard Intel 8088 as base measurement value...
--- ProBoard v2.16 [Reg]
---------------
* Origin: NC/NEC SEWAnet, Bucolic Fair (1:3407/25)
|