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/lab4/task3.asm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 sem2/lab4/task3.asm (limited to 'sem2/lab4/task3.asm') diff --git a/sem2/lab4/task3.asm b/sem2/lab4/task3.asm new file mode 100644 index 0000000..9dd868d --- /dev/null +++ b/sem2/lab4/task3.asm @@ -0,0 +1,40 @@ +.286 +.model tiny +.data +string db ?,?,' ',?,?,' ',?,?,0Ah,0Dh,'$' + +.code +org 100h +start: + MOV ah,1 + INT 1Ah + CMP bx,dx + MOV ah,2 + INT 1Ah + MOV ah,0 + MOV al,ch + ROR ax,4 + SHR ah,4 + OR ax,'00' + MOV word ptr string,ax + MOV ah,0 + MOV al,cl + ROR ax,4 + SHR ah,4 + OR ax,'00' + MOV word ptr string+3,ax + MOV ah,0 + MOV al,dh + ROR ax,4 + SHR ah,4 + OR ax,'00' + MOV word ptr string+6,ax + MOV ah,9 + MOV dx,offset string + INT 21h + MOV ax,4C00h + INT 21h +end start + +text segment +text ends -- cgit v1.2.3