Original Post
Hi I've just begun learning asm and encountered my first problem. Why does this code not work? It is supposed to do a simple calculation: d/(b-c)*(a+b)
.MODEL SMALL
ASSUME DS:Dane, CS:Kod, SS:Stosik
Dane SEGMENT
a DB 20
b DB 10
c DB 5
d DB 3
Dane ENDS
Kod SEGMENT
Start:
mov ax, Dane
mov ds, ax
mov bx, WORD PTR b
sub bx, WORD PTR c
mov ax, WORD PTR d
div bl
mov bx, WORD PTR a
add bx, WORD PTR b
mul bx
mov dx, ax
mov ah, 02h
int 21h
mov ax, 4C00h
int 21h
Kod ENDS
Stosik SEGMENT STACK
DB 512 DUP (?)
Stosik ENDS
END Start
It compiles well, but shows nothing when executed.