Jump to content
xisto Community

Angela

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Trying to learn assembly...How do I convert a hexidecimal form to the decimal equivalent? Notice from BuffaloHELP: Topic title modified.
  2. Hi Ghostrider! Well I figured it out. in my code... I used hex-table db "0123456789ABCDEF" instead hex_table db "0123456789ABCDEF". I used a hyphen instead of the underscore. That made the difference. In regard to the semi colons on my include statement.....that was intentional. I also removed the semi colons and my program ran. Thanks for getting my juices to flowing. I hope that your available in the future...because I am sure that I will have more assembly questions. Angela
  3. Hi Ghostrider! Any help is elaboration is better than none...I will try this..and I'll let you know how it turns out. Thanks again soooo much for your time and Assembly knowledge. It's much appreciated. Angela
  4. Hi Ghostrider! Thanks soooooo much for responding. I can't imagine anyone who would take this course because they want to. I am currently enrolled in the course because I have toooo...a tutor...I definitely need... anyway... I believe I am moving the hex_table into EBX...see a copy of the code below.... Any and all help is greatly appreciated...Thanks... mov EBX, hex_table; EBX = translation table
  5. I am brand new at learning Assembly...and can't seem to get this proram to execute.... This is my code.... ;;;;;%include "NASMENV\lib\io.mac".STACK 100H.DATAchar_prompt db "Please input a character: ",0out_msg1 db "The ASCII code of ' ",0out_msg2 db "' in hex is ",0query_msg db "Do you want to quit (Y/N): ",0; translation table: 4-bit binary to hexhex-table db "012345789ABCDEF", 0.CODE .STARTUPread_char: PutStr char_prompt; request a char. input GetCh AL PutStr out_msg1 PutCh AL PutStr out_msg2 mov AH,AL ; save input character in AH mov EBX, hex_table; EBX = translation table shr AL,4 ; move upper 4 bits to lower half xlatb ; replace AL with hex digit PutCh AL ; write the first hex digit mov AL,AH ; restore input character to AL and AL,0FH ; mask off upper 4 bits xlatb PutCh AL ; write the second hex digit nwln PutStr query_msg; query user whether to terminate GetCh AL ; read response cmp AL, 'Y' ; if response is not 'Y' jne read_char; read another characterdone: .EXIT When I attempt to make...I get the below.... PLEASE HELP! This is driving me bonkers!
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.