Home > other >  Have big help annotation, an assembler
Have big help annotation, an assembler

Time:09-19

+ qq2449227327
The Model Small

;;;;;;;;;;;; Macros;;;;;;;;;;

Draw_row Macro x, y, z, color; X - row, y - begining column, z - ending the column
The Local L1
; Draws a line in the row x from col to col y z
Ch MOV AH, 0
MOV AL, color
CX, MOV y
MOV DX, x
L1: INT 10 h
CX
INC.CX, CMP z
JL L1
EndM

Draw_column Macro x, y, z, color; - column x, y - begining row, z - ending row
The Local L2
; Draws a line col y from row to row z y
Ch MOV AH, 0
MOV AL, color
CX, MOV x
MOV DX, y
L2: INT 10 h
INC DX
CMP DX, z
JL L2
EndM

Display_string Macro x, row, column, length, color

Push ax
Push bx

MOV AX, @ DATA
MOV ES, AX

MOV AH, 13 h; WRITE THE STRING
MOV AL, 0 h; The ATTRIBUTE IN BL, MOVE CURSOR TO THAT POSITION
XOR BH, BH. VIDEO PAGE=0
Mov bl, color

BP, MOV OFFSET x; ES: BP POINTS TO THE TEXT
CX, MOV length; THE LENGTH OF THE STRING
MOV DH, row; ROW TO PLACE the STRING
MOV DL, the column; The COLUMN TO PLACE the STRING
INT 10 h

Pop bx
Pop ax

EndM


Draw_block Macro start_row, end_row start_column end_column, color_block
The Local along_row

; Draws a square

MOV DX, start_row

Along_row:

Draw_row DX, start_column end_column, color_block
INC DX
CMP DX, end_row
JLE along_row

EndM

; Write the draw a piece of macro - a task for tomorrow (Angela)

Draw_full_block Macro pattern_name, color, compare; Compare to four ta block er jonno jhamela, tai last row er first eta
element taThe Local the draw

; Draws a full pattern

MOV BX, 0

The draw:
Draw_block [pattern_name + BX], [pattern_name + BX + 2], [pattern_name + BX + 4], [pattern_name + BX + 6], color
The ADD BX, 8
CMP BX, compare
JLE the draw

EndM



Update_block Macro pattern_name, blockToBeUpdated
The local while

Push ax
Push bx
Push cx
Cx, mov 16
Mov bx, 0

While:
Mov ax, pattern_name [bx]
Mov blockToBeUpdated [bx], ax
The add bx, 2
; CMP bx, 24
Loop while

Pop cx
Pop bx
Pop ax
EndM




; Pull row downwards
Modify_row_elements Macro pattern_name, delta, number_of_blocks; The delta=dhakkar amount: 3
The local ghuro, exit

Push ax
Push bx
PUSH CX
PUSH DX


; Modify the row elements

Cx, mov number_of_blocks
Mov bx, 0

Ghuro:

Xor ax, ax
Xor dx, dx

MOV ax, pattern_name [bx]
The add ax, delta
MOV pattern_name [bx], ax

The add bx, 2

MOV dx, pattern_name [bx]
The add dx, delta
MOV pattern_name [bx], dx

The add bx, 6

Loop ghuro


Exit:
Pop dx
Pop cx
Pop bx
Pop ax

EndM

;;;;;;;;;;;;;; ; Daine bame dhakka dibo | B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Modify_column_elementsD Macro pattern_name, delta, compare; The delta=dhakkar amount: 3
The local byebye, shorao


Push ax
Push bx
PUSH CX
PUSH DX

; Modify the column elements

Mov bx, 4

Shorao:


; CMP pattern_name [30], 345,
; Jg byebye
Koop:
Cx, MOV pattern_name [bx]
Cx, add the delta
Cx, CMP 380
Jge byebye
MOV pattern_name [bx], cx

The add bx, 2
MOV dx, pattern_name [bx]

The add dx, delta
MOV pattern_name [bx], dx

The add bx, 6
Cx, xor cx
Xor dx, dx

CMP bx, compare
Jle shorao



Byebye:


Pop dx
Pop cx
Pop bx
Pop ax

EndM


Modify_column_elementsA Macro pattern_name, delta, compare
The local byebye, shorao

Push ax
Push bx
PUSH CX
PUSH DX

; Modify the column elements

Mov bx, 4

Shorao:


Cx, MOV pattern_name [bx]
Cx, sub delta
Cx, CMP 220
Jle byebye
MOV pattern_name [bx], cx

The add bx, 2
MOV dx, pattern_name [bx]
Sub dx, delta
MOV pattern_name [bx], dx


The add bx, 6
Cx, xor cx
Xor dx, dx

CMP bx, compare
Jle shorao


Byebye:

; Cx, sub 2; Offset move
; MOV pattern_name [bx], cx

Pop dx
Pop cx
Pop bx
Pop ax


EndM
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Dhakkadhakki sesh | B



Time_delay Macro pattern_name
Local tt, tt1 tt2, tt3, tt4, tt5, tt6, tt7, tt8, tt9 and tt10, tt11, sesh, show
; Push ax
Push bx
Push cx
Push dx

Tt:
CMP timer_flag, 1
Developed tt
MOV timer_flag, 0

; Draw_block preceding 158163235360 h



CALL move_block
; CALL check_line


Mov bx, pattern_name [16]
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related