I've just tried to write my first program in assembly for x86 and I don't know why, but it doesn't make what I want. There's no errors, no communicates but the program doesn't open after pushing 'execute'. i want these program to add two variables and send back theirs sum. here's code:
.386
.model flat, stdcall
option casemap:none
include windows.inc
include user32.inc
include kernel32.inc
includelib user32.lib
includelib kernel32.lib
.data
a dw 1h
b dw 2h
z dw 01 dup(?),0
.data?
.code
start:
mov ds, ax
mov ax, a
mov bx, b
clc
add ax, bx
mov edi, offset z
mov [edi], ax
mov ah, 09h
mov dx, z
int 21h
mov ah, 4ch
int 21h
end start
Please, help me :C