- Jan 6, 2001
- 22,530
- 13
- 81
Never done assembly before so I'm a newb.
Program must do: X = (A-(B-C)) - (D-(E-F)) and we cannot simplify it says.
This must be done in old style if that makes sense.
Here's what I have:
.model tiny
.code startupcode
mov ax,b
sub ax,c
mov bx,a
sub bx,ax
mov cx,e
sub cx,f
mov dx,d
sub dx,cx
sub bx,dx
mov x,bx
exitcode
a dw 4
b dw 3
c dw 1
d dw 2
e dw 1
f dw 0
x dw 0
end
Program must do: X = (A-(B-C)) - (D-(E-F)) and we cannot simplify it says.
This must be done in old style if that makes sense.
Here's what I have:
.model tiny
.code startupcode
mov ax,b
sub ax,c
mov bx,a
sub bx,ax
mov cx,e
sub cx,f
mov dx,d
sub dx,cx
sub bx,dx
mov x,bx
exitcode
a dw 4
b dw 3
c dw 1
d dw 2
e dw 1
f dw 0
x dw 0
end
