First post, by Goalatio
Created a new command for DOSbox.. it's a variant of the command prompt's "Color" command.
Note: Does not support intense colors
Code:
[org 0100h]
[section .text]
mov bl,0x80
mov bx,0x82
mov si,bx
lodsb
cmp al,'"'
jne error
main:
lodsb
shl al,4
mov [digit_tens],al
lodsb
shl al,4
shr al,4
mov [digit_ones],al
xor al,al
mov al,[digit_tens]
add al,[digit_ones]
mov [colors],al
lodsb
cmp al,'"'
jne error
display_color:
mov ah,2
mov dh,0
mov dl,0
int 10h
mov ah,9
mov bl,[colors]
mov cx,16000
mov al,0
int 10h
jmp exit
error:
mov ah,9
mov dx,errmsg
int 21h
exit:
mov ah,4ch
mov al,0
int 21h
[section .data]
digit_tens db 0
digit_ones db 0
colors db 0
errmsg db 'Invalid syntax. Use doscolor "##".', 13, 10, "$"
Screenshots:
I will release the program on request.
It's passion that drives me.