Tutam 1.docx

  • Uploaded by: aqsalp
  • 0
  • 0
  • July 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Tutam 1.docx as PDF for free.

More details

  • Words: 226
  • Pages: 4
TUTAM PRAKTIKUM MIKON NAMA : ANDIRA LAKSAMANA PUTRA NPM : 1606870843 ASLAB : MAHDI YUSUF

JAWABAN : .MODEL SMALL

.DATA tulisan db 'Masukkan Angka pertama:',13,10,'$' tulisan1 db 13,10,'Masukkan Angka kedua:',13,10,'$' tulisan2 db 13,10,'Hasilnya adalah:',13,10,'$' tulisan3 db 13,10,'Tekan angka 0 untuk mulai lagi :)',13,10,'$' angka1 db 2 dup (?) angka2 db 2 dup (?) angka3 db 2 dup (?) angka4 db 2 dup (2) angka5 db 2 dup (2)

.CODE .STARTUP

MAIN:

MOV CL,10 MOV DX,OFFSET tulisan MOV AH,09H INT 21H ;cetak tulisan diakhiri $

MOV AH,01H

INT 21H SUB AL,30H MUL CL MOV angka1[0],AL

MOV AH,01H INT 21H SUB AL,30H ADD angka1[0],AL MOV BH, angka1[0] MOV angka2[0],BH

MOV DX,offset tulisan1 MOV AH,09H INT 21H ;cetak tulisan diakhiri $

MOV AH,01H INT 21H SUB AL,30H MUL CL MOV angka3[0],AL

MOV AH,01H INT 21H SUB AL,30H ADD angka3[0],AL MOV BH,angka3[0] MOV angka4[0],BH

MOV DX, OFFSET tulisan2 MOV AH, 09H

INT 21H

MOV CL,angka2[0] MOV DH,angka4[0] MOV AX,0000H ADD CL,DH MOV AL,CL MOV CH,100 DIV CH CMP AL,01H JNE LANJUT MOV DL,31H MOV AH,02H SUB CL,100 INT 21H

LANJUT:

MOV AX,0000H MOV AL,CL MOV CH,10 DIV CH OR AX,3030H MOV angka5[1],AH MOV angka5[0],AL

MOV AX,0000H MOV DL,angka5[0] MOV AH,02H INT 21H

MOV AX,0000H MOV DL,angka5[1] MOV AH,02H INT 21H

MOV DX, OFFSET tulisan3 MOV ah, 09H INT 21H

MOV AH,01H INT 21H CMP AL,30h JE MAIN:

ENDING:

.EXIT END

Related Documents


More Documents from "Kevin Bran"