From 143f34d941f32e0808fc9344d4c4126ff530d64a Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 22 Oct 2020 21:03:24 +0400 Subject: =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20=D1=80?= =?UTF-8?q?=D0=B5=D1=88=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D1=81=D0=B5=D0=BC=D0=B5=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sem2/lab3/draw.asm | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 sem2/lab3/draw.asm (limited to 'sem2/lab3/draw.asm') diff --git a/sem2/lab3/draw.asm b/sem2/lab3/draw.asm new file mode 100644 index 0000000..7a3d30f --- /dev/null +++ b/sem2/lab3/draw.asm @@ -0,0 +1,117 @@ +.model small +.stack 100h +.data + +screenArr db 2000 dup (0) + +.code +.486 + +start: + MOV ax,@DATA + MOV ds,ax + + MOV ch,24 + MOV cl,80 + + MOV bx, offset screenArr + +lines: + MOV dh,24 + SUB dh,ch + + columns: + MOV dl,80 + SUB dl,cl + + ; Устанавливаем курсор + PUSH bx + MOV bx,00h + + MOV ah,02h + INT 10h + + POP bx + + ; Читаем символ + PUSH bx + MOV bx,00h + + MOV ah,08h + INT 10h + + POP bx + + ; Записываем прочитанные символ в массив + MOV byte ptr [bx],al + INC bx + + ; Пишем символ + PUSH bx + MOV bx,00h + + MOV ah,0Ah + MOV al,'a' + INT 10h + + POP bx + + DEC cl + JNZ columns + + + + DEC ch + JNZ lines + +input: + MOV dx,1900h + INT 10h + + MOV ah,07h + INT 21h + +MOV bx, OFFSET screenArr + +lines2: + MOV dh,24 + SUB dh,ch + + columns2: + MOV dl,80 + SUB dl,cl + + ; Устанавливаем курсор + PUSH bx + MOV bx,00h + + MOV ah,02h + INT 10h + + POP bx + + + ; Пишем символ + PUSH dx + MOV dh,[bx] + PUSH bx + + MOV bx,00h + MOV al,dh + INT 10h + + POP bx + POP dx + + INC bx + + DEC cl + JNZ columns2 + + DEC ch + JNZ lines2 + +exit: + MOV ax,4C00h + INT 21h +END start \ No newline at end of file -- cgit v1.2.3