Jump to content
poznasha

probleme in asm

Recommended Posts

Posted (edited)

postez aici niste probleme de matematica facute de mine in timpul anului,iar mai incolo voi posta niste jocuri in asm.daca vrea cineva sa vina cu noi creatii aici,e binevenit :)

ps: pot fi compilate in fasm sau emu8086.

1.face suma a 2 numere

org 100h

mov ah,01h
int 21h

mov bl,al
sub bl,'0'

int 21h
mov bh,al
sub bh,'0'

add bl,bh

mov ax,0
mov al,bl

mov cl,10

DIV cl

mov dl,al

push ax

add dl,'0'

mov ah,02h
int 21h

pop ax

mov dl,ah
add dl,'0'
mov ah,02h

int 21h

mov ah,01h
int 21h

int 20h

2.maximul a 2 numere

 org 100h

mov ah,01h
int 21h

mov bl,al

int 21h

cmp al,bl

ja reper

mov dl,bl
jmp reper2

reper:
mov dl,al

reper2:
mov ah,02h
int 21h

mov ah,01h
int 21h

3.nr fibonacci folosind loop(while)

 .model small
.stack
.data
a dw 1 ;la compilare "a" se inloc cu 1
b dw 1 ;la compilare "b" se inloc cu 1
c dw ?
n dw 5
.code
start:
mov ax,@data
mov ds,ax
dec n
mov cx,n ;initializez contorul cu nr. iteratiilor de efectuat
inceput:
mov ax,a
add ax,b
mov c,ax
mov ax,b
mov a,ax
mov ax,c
mov b,ax
loop inceput
mov ah,4ch
int 21h
end start

deocamdata atat va arat. sa vad cum se comporta topicul(daca se merita) si voi posta ceva mai interesant decat astea.

Edited by poznasha
Guest Nemessis
Posted

Foarte misto. Te-ai gandit ca mai bine te-ai fute in gaozul ala mare si plin de celulita?

Guest Nemessis
Posted

Pai nu ne abatem de la subiect. Subiectul este: tu grasa, tu nefututa, tu in cautarea pulii.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...