Reminder asm
12:24
SEGMENT .bss ;(Variables)
Variable resb 1 SEGMENT .data ;(Constantes)
Constante db 1 SEGMENT .text ; Ecran mode texte (Debut)Mov ax,03Int 10h | ; pour finirMov ax,0x04c00Int 21h | Mov bh,0 ; page d’affichageMov bl,8h ; couleur texteMov cx,1 ; nombre de répétitionsMov dl,0 ; colonneMov dh,0 ; ligne | ; position du curseur …Mov ah,02hInt 10h | | Lire | Afficher | Char(al) | Mov ah,07hInt 21h | Mov ah,09hInt 10h; Ascii | String(dx) | Mov ah,0ahInt 21hMettre dans dx @de reception | Mov ah,09Int 21h; terminée par $ | Div op8
AX/op8 = al comme quotient et ah comme reste Div op16
DX:AX/op16 = aX comme quotient et DX comme reste
NOTES
Ascii : 0 48 A 65 a 97
Mode Graphique ;permet d init en mode graphique 640*480
Mov ax,12h
Int 10h AL<-couleurs
BH<- page
CX<- Colonne
DX<-Ligne
;afficher le pixel
Mov ah,0ch
Int 10h ;;;;;;;;;;;;;;;;;;;;;;;;;;
Need
SEGMENT .bss col resw 1 ligne resw 1 sizeH resw 1 sizeL resw 1 inter resw 1 delay: ;Temporiasation = DX x (1/60s), aucun registre n'est modifié pusha MOV CX,DX MOV DX,03DAh ; port dont le bit 3 correspond au spot.att0: IN AL,DX ; lire le port 03DAh TEST AL,8 ; masquer le spot JZ .att0 ; attendre 0 = balayage ‚cran (descente).att1: IN AL,DX ; lire le port TEST AL,8 ; masquer le spot JNZ .att1 ; attendre 1 = retour vertical loop .att0 popa RET | line: pusha mov cx,[col] mov si,[sizeL] add si,cx mov al,01 mov bh,0 mov dx,[ligne] mov ah,0ch lne: int 10h add cx,1 cmp cx,si jbe lne popa ret |
coll: pusha mov dx,[ligne] mov si,[sizeH] add si,dx mov al,01 mov bh,0 mov cx,[col] mov ah,0ch lne2: int 10h add dx,1 cmp dx,si jbe lne2 popa ret | rectangle: