- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
[org 0x0100] n1: db 1 n2: db 2 largest: db 0 mov ax, byte[n1] mov bx, byte[n2] cmp ax,bx jg next mov [largest],bx jmp endrtn next:mov [largest],ax endrtn: mov ax, 0x4c00 int 0x21 error in line 6 and 7 error is mismatch in operand sizes |
|
[org 0x0100] num: db 0 factorial: dw 1 VUID: db 1,2,3,4,5,6,7,8 mov bx,0 jmp start fact: mov ax, byte[num] fact_loop: mul word[factorial] sub ax,1 cmp ax,0 jg fact_loop ret start: mov bx,0 mov cx,[VUID+bx] add bx,1 shr cx,1 jc start mov [num],cx call fact mov ax, 0x4c00 int 0x21 |
|
[org 0x0100] num: db 0 factorial: dw 1 VUID: db 1,2,3,4,5,6,7,8 mov bx,0 jmp start fact: mov ax, byte[num] fact_loop: mul word[factorial] sub ax,1 cmp ax,0 jg fact_loop ret start: mov bx,0 mov cx,[VUID+bx] add bx,1 shr cx,1 jc start mov [num],cx call fact mov ax, 0x4c00 int 0x21 when … |