trucchi-com

tutti i trucchi che nessuno sà

 

AREA PERSONALE

 

TAG

 

ARCHIVIO MESSAGGI

 
 << Luglio 2024 >> 
 
LuMaMeGiVeSaDo
 
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
 
 

FACEBOOK

 
 

CONTATTA L'AUTORE

Nickname: romoletto640
Se copi, violi le regole della Community Sesso: M
Età: 59
Prov: EE
 

 

« assembler per principiantiINTRODUZIONE ALLA PROGRAMMAZIONE »

assembler per principianti

Post n°17 pubblicato il 02 Giugno 2007 da romoletto640
 

Esempi

N. 1

;98-10.ASM

.model small

.stack 100h

.DATA

.CODE

main:

MOV AX,@DATA

MOV DS,AX

MOV AX,0 ;0000

MOV AH,12D ;0C00

MOV AL,12H ;0C12

MOV AL,0H ;0C00 0h = 00h

MOV AL,12H ;0C12

MOV AL,0b ;0C00 0b = 0h

MOV AH,4Ch

INT 21h

end main

END.

N. 2

;exam2.asm

;02/10/2001

;shows * on the computer screen

.model small

.stack

.code

mov ah,2h ;moves the value 2h to register ah

mov dl,2ah ;moves the value 2ah to register dl

mov cx,10

ciclo:

int 21h ;21h interruption

loop ciclo

mov ah,4ch ;4ch function, goes to operating system

int 21h ;21h interruption

END ;finishes the program code

N.3

;led1

;programma che accende 8 led in successione collegati in output alla porta ;parallela

.model small

.stack 100h

.DATA

.CODE

MOV AX,@DATA

MOV DS,AX

mov dx,378h ; indirizzo della porta parallela

mov al,00000001b ; inizia dal primo led acceso

mov cx,0ffffh ; conta il numero di cicli

ripeti: out dx,al ; output

mov bx,0 ; ritardo

inic1: mov ah,200

inic2: dec ah

jnz inic2

dec bx

jnz inic1

rol al,1 ; prepara il prossimo output

loop ripeti

MOV AH,4Ch

INT 21h

END

N. 4

 

;98-10.ASM

.model small

.stack 100h

.DATA

.CODE

main:

MOV AX,@DATA

MOV DS,AX

mov ax,0ffffh

add ax,0001h

mov ax,0001h

sub ax,0003h

mov ax,0ffffh

add ax,0ffffh

mov ax,0002h

sub ax,0002h

mov ah,00h

sub ah,02h

mov ah,20h

sub ah,20h

mov ah,00h

add ah,0ffh

mov ah,00h

add ah,11h

add al,04h

MOV AH,4Ch

INT 21h

end main

END.

 

N. 5

;exam2.asm

;02/10/2001

;stampa un quadrato di asterischi 10*10

.model small

.stack

.code

mov ah,2h ;moves the value 2h to register ah

mov dl,2ah ;moves the value 2ah to register dl

mov cx,10 ;assigned loop value

lab1:

int 21h ;21h interruption

mov dl,32

int 21h

mov dl,2ah

loop lab1 ;loop

mov dl,10

int 21h

mov dl,13

int 21h

mov cx,8

lab3:

mov dl,2ah

int 21h

mov dl,32

int 21h

mov dl,2ah

mov bx,cx

mov cx,16

lab4:

mov dl,32

int 21h

loop lab4

mov cx,bx

mov dl,2ah

int 21h

mov dl,10

int 21h

mov dl,13

int 21h

loop lab3

mov dl,2ah

mov cx,10

lab2:

int 21h

mov dl,32

int 21h

mov dl,2ah

loop lab2

mov ah,4ch ;4ch function, goes to operating system

int 21h ;21h interruption

END ;finishes the program code

N. 6

;stampa stringa colorata e di dimensione superiore (forse)

.model small

.stack 100h

.DATA

stringa db 'sistemi$'

.CODE

;-----------------------------------------------------

inizio:

MOV AX,@DATA

MOV DS,AX

ret

;-----------------------------------------------------

fine:

MOV AH,4Ch

INT 21h

ret

;-----------------------------------------------------

stampacol:

mov bh,0

mov bl,2

int 10h

mov ah,09

lea dx,stringa

int 21h

ret

;-----------------------------------------------------

;stampadim:

;ret

;-----------------------------------------------------

main:

call inizio

call stampacol

; call stampadim

call fine

end main

END.

 

 

N. 7

 

.model small

.stack 100h

.DATA

.CODE

MOV ah,02h

mov dl,2ah

mov bh,0 ; controllo numero asterischi

riga:

inc bh ; stabilisce quanti asterischi devono essere stampati sulla riga corrente

mov bl,0

aster:

int 21h ; stampa un asterisco

inc bl

cmp bl,bh ; termina quando sono stati stampati bh asterischi

jne aster

mov dl,10

int 21h

mov dl,13

int 21h

mov dl,2ah

cmp bh,5

jne riga ; stampa un'altra riga

MOV AH,4Ch

INT 21h

END

t_asterischi.asm
stringacolore.asm
quadrato di asterischi.asm
prova.asm
led.asm
Asterischi
da http://megarchivio.cjb.net

La URL per il Trackback di questo messaggio è:
https://blog.libero.it/trucchicom/trackback.php?msg=2789036

I blog che hanno inviato un Trackback a questo messaggio:
Nessun trackback

 
Commenti al Post:
Nessun commento
 
 
 

INFO


Un blog di: romoletto640
Data di creazione: 29/05/2007
 

CERCA IN QUESTO BLOG

  Trova
 

ULTIME VISITE AL BLOG

precious445benny1984fredom010pantera_blanca2NevegGgiallAea.joobleRjegu73developer68OLIO5wallygator54istrice82hiram9mrk2005rospetta000erconte5
 

CHI PUò SCRIVERE SUL BLOG

Solo l'autore può pubblicare messaggi in questo Blog e tutti gli utenti registrati possono pubblicare commenti.
 
RSS (Really simple syndication) Feed Atom
 
 

I MIEI LINK PREFERITI

 

© Italiaonline S.p.A. 2024Direzione e coordinamento di Libero Acquisition S.á r.l.P. IVA 03970540963