storm@cs.mcgill.ca (Marc WANDSCHNEIDER) (06/21/91)
Is there any dedicated instruction in the 8088 instruction set that will perform a clear on a register or memory location ie (a la PDP 11) CLR CX CLR AH CLR MEMORY_LOCATION So far, all I've seen is XOR AH,AH; MOV CX, 0; and that's about it. ./*- storm@bart.cs.mcgill.ca storm@sizone.UUCP -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ storm@cs.mcgill.ca McGill University It's 11pm, do YOU Marc Wandschneider Montreal, CANADA know what time it is? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a_rubin@dsg4.dse.beckman.com (Arthur Rubin) (06/21/91)
In <1991Jun21.031233.11058@cs.mcgill.ca> storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes: >Is there any dedicated instruction in the 8088 instruction set that will >perform a clear on a register or memory location >ie (a la PDP 11) >CLR CX >CLR AH >CLR MEMORY_LOCATION >So far, all I've seen is XOR AH,AH; MOV CX, 0; and that's about it. What's wrong with MOV WORD PTR MEMORY_LOCATION, 0 -- 2165888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal) a_rubin@dsg4.dse.beckman.com (work) My opinions are my own, and do not represent those of my employer.
andy@bluemoon.uucp (Andy Vaught) (06/22/91)
storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes: > > Is there any dedicated instruction in the 8088 instruction set that will > perform a clear on a register or memory location > Yes-- and its even more general than simply a clearing a memory location, you can write a constant to a memory address without worrying about registers. For example, mov [WORD 2], 3456 Is perfectly legal. This is an often overlooked 80x86 addressing mode. ------------------------------------------------------------------ Andy Vaught (Fuzzy Andy) :: C Code. C Code Run. Run C code, Run... Grad Student on Vacation :: before I whip out my 12-Gauge andy@bluemoon.uucp :: Dynamic Debugging Tool!