this is my code, i dont know if there is a faction or somthing that i can use to fill in the table random letters, some1 know? (its print a table with spaces in each index of the table, there is somthin i can use or to replace all the spaces with a letter or do same loop for the space generating but with random letters? IDEAL MODEL small STACK 100h DATASEG TimesToPrintCol db 7 TimesToPrintRow db 6 TimesToPrintNewRow db 6 TimesToPrintStart db 25 TimesToPrintSpace db 6 NumOfTimesSpace db 9 NumOfTimesCol db 9 NumOfTimesRow db 9
CODESEG start: mov ax, @data mov ds, ax mov ax, 13h int 10h PrintStart: xor cx, cx mov cl, [TimesToPrintStart] cmp cx, 0 je NewLine sub [TimesToPrintStart], 1 mov dl,'' mov ah , 2 int 21h jmp PrintStart NewLine: mov dl,10 mov ah, 2 int 21h mov dl, 13 mov ah, 2 int 21h xor cx, cx PrintCol: xor cx, cx mov cl, [TimesToPrintCol] cmp cx, 0 je PrintLineCol sub [TimesToPrintCol], 1 mov dl,'|' mov ah , 2 int 21h jmp PrintRow PrintSpace: xor cx, cx mov cl, [TimesToPrintSpace] cmp cx, 0 je PrintLineCol sub [TimesToPrintSpace], 1 mov dl,' ' mov ah , 2 int 21h jmp PrintNewRow PrintRow: xor cx, cx mov cl, [TimesToPrintRow] cmp cx, 0 je PrintLineRow sub [TimesToPrintRow], 1 mov dl,'' mov ah , 2 int 21h jmp PrintSpace PrintLineCol: mov dl,10 mov ah, 2 int 21h mov dl, 13 mov ah, 2 int 21h xor cx, cx mov cl, [NumOfTimesCol] cmp cx, 0 je PrintLineRow sub [NumOfTimesCol], 1 add [TimesToPrintCol], 7 add [TimesToPrintRow], 6 add [TimesToPrintSpace], 6 jmp PrintCol PrintNewRow: xor cx, cx mov cl, [TimesToPrintNewRow] cmp cx, 0 je PrintLineCol sub [TimesToPrintNewRow], 1 mov dl,'_' mov ah , 2 int 21h jmp PrintCol PrintLineRow: mov dl,10 mov ah, 2 int 21h mov dl, 13 mov ah, 2 int 21h xor cx, cx mov cl, [NumOfTimesRow] cmp cx, 0 je exit sub [NumOfTimesRow], 1 add [TimesToPrintCol], 7 add [TimesToPrintRow], 6 add [TimesToPrintSpace], 6 add [TimesToPrintNewRow] , 6 jmp PrintCol exit: mov ax, 4c00h int 21h END start
Aucun commentaire:
Enregistrer un commentaire