ASSEMBLED CYCLE IN ASSEMBLY

0

You will see I am doing an assembler drawing and I am already coloring it but I have to be drawing line by line the lines I draw with this code:

  MOV CX,20    ;CORD X
  MOV DX,21    ;CORD Y

CG6:       MOV AH, 0Ch; DRAW PIXEL       MOV AL, 0016H; AL = Color       INT 10h

  INC  CX             ;Incrementa posiscion en x
  CMP  CX,60      ;hasta la posicion 315
  JNE  CG6

I wanted to know if there is any way to draw several through a nested cycle, for example in this case DX represents the cordenda in Y and that is what I want to go down and so draw the others, I tried something like this:

  MOV CX,20    ;CORD X
  MOV DX,21    ;CORD Y

CG6:       MOV AH, 0Ch; DRAW PIXEL       MOV AL, 0016H; AL = Color       INT 10h

  INC  CX             ;Incrementa posiscion en x
  CMP  CX,60      ;hasta la posicion 315
  JNE  CG6


  MOV CX,20    ;CORD X
  MOV DX,22    ;CORD Y

CYCLE:       INC DX CG7:

  MOV  AH, 0Ch        ;DRAW PIXEL
  MOV  AL, 0016H      ;AL=Color
  INT 10h

  INC  CX             ;Incrementa posiscion en x
  CMP  CX,31      ;hasta la posicion 315
  JNE  CG7


  CMP DX,29
  JNE CICLO

But I do not find it, someone knows how I could do it?

    
asked by Alex Palacios 20.05.2018 в 07:43
source

0 answers