TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: CHRISTIAN IVERSEN
from: SCOTT MCNAY
date: 1997-12-24 11:41:00
subject: How to`s (again ;)

 *** Christian Iversen wrote in a message to All:
CI>   How do you write to a specific byte in memory in Dos??
CI> And...
CI>   How do you write to a specific byte in memory in
CI> Windows(95) ?? And...
It would help if you'd explain this in more detail, since there are many 
different kinds of memory, and  you first need to have access to the memory. 
VGA Video memory in particular can be complex.  But, the most basic example 
would be this:
  mov di,1234             ;Whatever offset you want
  mov ax,5678             ;Whatever segment you want
  mov ds,ax
  mov byte ptr ds:[di],56 ;Whatever value you want
CI>   Does the video memory start at $A000 on all gfx. cards??
Monochrome graphics and text use $B000-$B7FF, CGA graphics and text use 
$B800-$BFFF, VGA graphics use $A000-$AFFF.  Some SVGA modes use the entire 
$A000-$BFFF region, while others use a large flat memory area way up in 
extended memory; the exact location depends on where you put it; using a 
library is recommended for using any graphics modes.
CI> And...
CI>   What is the fastest way (if there are any diffence) to
CI> compary a register   with the value zero.
Hmmm... either  OR AX,AX  or  AND AX,AX is probably fastest.  To set a 
register to zero, XOR AX,AX is probably the fastest.  CPU optimization may 
make these untrue, though.
--Scott.
--- timEd 1.01
---------------
* Origin: Wizard's, 254-554-2146, Abacus PLUS, 903-3097 (1:395/11)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.