Assembler Developer

Moderators: None (Apply to moderate this forum)
Number of threads: 1030
Number of posts: 1826

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
machine language Posted by fairydoll83 on 22 Feb 2004 at 7:57 PM
I have to add 2,-3, and 6 in machine language. does anyone know how to do this?
Report
Re: machine language Posted by Evenbit on 23 Feb 2004 at 6:39 PM
: I have to add 2,-3, and 6 in machine language. does anyone know how to do this?
:
; Add.asm
;
; Assemble with:
; NASM Add.asm -o Add.com
;

org 100h

mov al, 02
add al, -03
add al, 06

ret

However, if you need the actual hex code (since the subject is 'machine language' instead of 'assembly'), then here is a disassembly with the ML in the middle column:

00000000 B002 mov al,0x2
00000002 04FD add al,0xfd
00000004 0406 add al,0x6
00000006 C3 ret





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.