Category: Assembly

Category: Assembly

Assembly : Coding Posisi Mouse
Image December 20, 2019 Ari Usman,Artikel Komputer,Assembly admin

; mouse test name “mouse” org 100h print macro x, y, attrib, sdat LOCAL s_dcl, skip_dcl, s_dcl_end pusha mov dx, cs mov es, dx mov ah, 13h mov al, 1 mov bh, 0 mov bl, attrib mov cx, offset s_dcl_end – offset s_dcl mov dl, x mov dh, y mov bp, offset s_dcl int 10h

Details
Assembly : Coding Convert to UPPERCASE
Image December 20, 2019 Ari Usman,Artikel Komputer,Assembly admin

; this is a program in 8086 assembly language that ; accepts a character string from the keyboard and ; stores it in the string array. the program then converts ; all the lower case characters of the string to upper case. ; if the string is empty (null), it doesn’t do anything. name “upper”

Details
Assembly : Coding Traffic Light
Image December 20, 2019 Ari Usman,Artikel Komputer,Assembly admin

; controlling external device with 8086 microprocessor. ; realistic test for c:\emu8086\devices\Traffic_Lights.exe start=Traffic_Lights.exe name “traffic” mov ax, all_red out 4, ax mov si, offset situation next: mov ax, [si] out 4, ax ; wait 5 seconds (5 million microseconds) mov cx, 4Ch ; 004C4B40h = 5,000,000 mov dx, 4B40h mov ah, 86h int 15h add

Details
Assembly : Coding Faktorial
Image December 20, 2019 Ari Usman,Artikel Komputer,Assembly admin

; this example gets the number from the user, ; and calculates factorial for it. ; supported input from 0 to 8 inclusive! name “fact” ; this macro prints a char in AL and advances ; the current cursor position: putc macro char push ax mov al, char mov ah, 0eh int 10h pop ax

Details
Assembly : Program Calculator
Image December 20, 2019 Ari Usman,Artikel Komputer,Assembly admin

name “calc2” ; command prompt based simple calculator (+,-,*,/) for 8086. ; example of calculation: ; input 1 <- number: 10 ; input 2 <- operator: – ; input 3 <- number: 5 ; ——————- ; 10 – 5 = 5 ; output -> number: 5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; this maro is copied from emu8086.inc ;;;

Details