Question: Can anyone help me take a 16bit code and make a 32bit code this is a assembly language project. 16bit code below. Can I get

Can anyone help me take a 16bit code and make a 32bit code this is a assembly language project. 16bit code below. Can I get explaination on what is happening.

title gcd03 ; find gcd of two numbers

include irvine16.inc

;_________________________________________________________-

.data

num1 dw 0000h

num2 dw 0001h

string1 db 'enter the smaller number = ','$'

string2 db 'enter the larger number = ','$'

result db 'gcd is = ','$'

gcd dw 0002h

;____________________________________________________________

.code

k11main proc far

mov ax,@data

mov ds,ax

mov es,ax

call b11clrview

lea di,string1

lea si,string2

mov dh,05

mov dl,11

call b12cursor

mov ah,09h

lea dx,string1

int 21h

call readint

mov num2,ax ;smaller number

mov dh,07

mov dl,11

call b12cursor

mov ah,09

lea dx,string2

int 21h

call readint

mov num1,ax ;have a cmp of num1 > num2

mov bx,num2

cmp ax,bx

jae lupe1

xchg ax,bx

lupe1:

mov dx,0000h div bx

cmp dx,0000h

jz endoflupe1

mov gcd,dx

mov ax,bx

mov bx,dx

jmp lupe1 endoflupe1:

mov dh,11

mov dl,17

call b12cursor

lea dx,result

mov ah,09h

int 21h

mov ax,gcd

call writeint

mov dh,22

mov dl,11

call b12cursor

mov ax,4c00h

int 21h

k11main endp

;__________________________________________________________

b11clrview proc

pusha

mov ah,06h ;clear screen

mov al,00h ;full screen

mov bh,74h ;page 157

mov cx,0000h ;starting row;column

mov dx,314fh ;ending row column

int 10h

popa ret b11clrview endp

;_________________________________________________________

;cursor coordinates are placed in dx before calling procedure

b12cursor

proc

pusha

mov ah,02h ;set cursor

mov bh,00h ;page number zer0

int 10h

popa ret b12cursor endp

;________________________________________________________

b10screen

proc near

pusha ;preserve general registers

mov ah,08h ;request get current

int 10h ;attribute in ah

mov bh,ah ;

move it to bh

mov ax,0600h ;scroll whole screen

mov cx,0000 ;upper left location

mov dx,314fh ;lower right location

int 10h

mov ax,0610h ;create a 16-line window

mov bh,16h ;blue b/g , brwn f/g

mov cx,0418h ;upper left corner 04:24

mov dx,1336h ;lower corner 19:54

int 10h

popa ;restore general registers ret ;return to caller

b10screen endp

end k11main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!