×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

how do i clear ax and bx?

how do i clear ax and bx?

how do i clear ax and bx?

(OP)
hi
as per peter nortons assembly language book for the ibm pc, i added ax to bx twice and need to subtract the same numbers twice-
-i did the subtraction once and then got lost as to what do.
when i tried to start from the begining, ax and bx had the same numbers still in them--how do i clear ax and bx?
  Also, is the debug.exe in my windows mellinum edition in a p3 the same debug.exe referenced in the 1989 book that i am learning from?
  thanks in advance

RE: how do i clear ax and bx?

I am a little confused as to what you are trying to accomplish. If you mean clear ax and bx as in set them to 0, then you would just use the 'mov' opcode, ie:
  mov ax,0
  mov bx,0

The debug you are using would probably be an upgraded version to 'fit in' with the new OS better, but all the commands such as 'a' and 'g' are the same. You should be able to use it in the same way as described in your book.
NB: Type ? in debug to get a listing of all commands.


The mind is like a parachute - it works better when open...

RE: how do i clear ax and bx?

Show us the piece of code you are working on...

rgds
Zeit.

RE: how do i clear ax and bx?

other common approaches are
xor ax, ax
sub ax, ax
Pros and cons either way. These change the flags, but something like mov eax, 0 is quite a lot of bytes of instruction.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close