Convert unsigned decimal 60293 to a hexadecimal value. 1656 いr6u293
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Assembly Programming question:
Convert unsigned decimal 60293 to a hexadecimal value
Expert Solution
Step 1
Assembly code to convert decimal 60293 to hexadecimal:
.MODEL SMALL
.STACK 100H
.DATA
d1 dw 60293
.CODE
MAIN PROC FAR
MOV AX,
@DATA
MOV DS,
AX
in variable d1
mov ax,
d1
print the value
CALL PRINT
MOV AH,
4CH INT 21H
MAIN ENDP
PRINT PROC
mov cx,
0 mov dx, 0 label1:
ax is zero
cmp ax,
0 je print1
div bx
push dx
inc cx
xor dx,
dx
jmp label1
print1:
cmp cx,
0 je exit
pop dx
value is greater than 9
add dx,
7
continue:
add dx,
48
character
mov ah,
02h int 21h
dec cx
jmp print1
exit : ret
PRINT ENDP
END MAIN
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education