Text Colour - Assembly Language - MASM

Program:
.model tiny
.code
.startup
    jmp install
    add8 dd ?
    tick db 0
    flag db 0bh
colorisr proc far
    push ax
    push bx
    push cx
    push di
   
    inc tick
    mov al,tick
    cmp al,5*18
    jb skip
    mov al,0
    mov tick,al
    mov al, flag
    cmp al,0bh
    je next1
    mov al,0bh
    jmp next2
next1:
    mov al,0ch
next2:
    mov flag,al
    mov bx,0b800h
    mov es,bx
    mov di,1
    mov cx,4000
back1:
    mov es:[di],al
    inc di
    inc di
    loop back1
    pushf
    CALL CS:add8
    pop di
    pop cx
    pop bx
    pop ax
colorisr endp
install:
    mov ax,cs
    mov ds,ax
    mov ah,35h
    mov al,08h
    int 21h
    mov word ptr add8,bx
    mov word ptr add8+2,es
    mov ah,25h
    mov al,08h
    mov dx,offset colorisr
    int 21h
    mov dx,offset install
    mov cl,4
    shr dx,cl
    inc dx
skip:
    mov ah,31h
    mov al,00
    int 21h
    end

1 comment:

  1. You made some good points .I did a little research on the topic and found that most people agree with your blog. Thanks. translation services

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...