Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;Britain Flag in TASM DOS-BOX compile with tlink as com file
- include graphics.h
- .model small
- code segment
- assume cs:code
- org 100h
- start:
- ;Video Mode param: 03h - 80x45 text
- Video_Mode 03h
- ;Reset cursor position to screen space origin
- cursor_to 0, 0
- ;[filling the background] params: color, width, height
- fill_bg 00010001b, 80, 24
- ;Reset cursor position to screen space origin
- cursor_to 0, 0
- ;[here start the diagonal block]
- mov cx, 11
- mov al, 254
- mov bl, 01110111b
- Diagonal_BLock1:
- push dx ;push dx to stack to save old register
- ;part here creates the 12x2 block
- mov ah, 9h
- int 10h
- inc dh
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- ;added
- mov ah, 9h
- int 10h
- inc dh
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- pop dx ;retrieve dx
- add dl , 4 ;x spacing
- add dh, 1 ;y spacing
- mov ah, 2h
- int 10h
- ;Comparison to cut the line
- cmp dh, 10
- jne Diagonal_BLock1
- ;cursor position to screen space
- cursor_to 0, 1
- ;[here start the diagonal Red block]
- mov cx, 5
- mov al, 254
- mov bl, 01000100b
- Diagonal_BLockR1:
- push dx ;push dx to stack to save old register
- ;part here creates the 12x2 block
- mov ah, 9h
- int 10h
- pop dx ;retrieve dx
- add dl , 4 ;x spacing
- add dh, 1 ;y spacing
- mov ah, 2h
- int 10h
- ;Comparison to cut the line
- cmp dh, 10
- jne Diagonal_BLockR1
- ;cursor position to screen space
- cursor_to 69, 0
- ;[here start the diagonal block]
- mov cx, 11
- mov al, 254
- mov bl, 01110111b
- Diagonal_BLock2:
- push dx ;push dx to stack to save old register
- ;part here creates the 12x2 block
- mov ah, 9h
- int 10h
- inc dh
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- ;added
- mov ah, 9h
- int 10h
- inc dh
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- pop dx ;retrieve dx
- sub dl , 4 ;x spacing
- add dh, 1 ;y spacing
- mov ah, 2h
- int 10h
- ;Comparison to cut the line
- cmp dh, 10
- jne Diagonal_BLock2
- ;cursor position to screen space
- cursor_to 74, 0
- ;[here start the diagonal red block]
- mov cx, 6
- mov al, 254
- mov bl, 01000100b
- Diagonal_BLockR2:
- push dx ;push dx to stack to save old register
- ;draw the line
- mov ah, 9h
- int 10h
- pop dx ;retrieve dx
- sub dl , 4 ;x spacing
- add dh, 1 ;y spacing
- mov ah, 2h
- int 10h
- ;Comparison to cut the line
- cmp dh, 10
- jne Diagonal_BLockR2
- ;cursor position to screen space
- cursor_to 0, 23
- ;[here start the diagonal block]
- mov cx, 11
- mov al, 254
- mov bl, 01110111b
- Diagonal_BLock3:
- push dx ;push dx to stack to save old register
- ;part here creates the 12x2 block
- mov ah, 9h
- int 10h
- dec dh
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- ;added
- mov ah, 9h
- int 10h
- dec dh
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- pop dx ;retrieve dx
- add dl , 4 ;x spacingm
- sub dh, 1 ;y spacing
- mov ah, 2h
- int 10h
- ;Comparison to cut the line
- cmp dh, 10
- jne Diagonal_BLock3
- ;cursor position to screen space
- cursor_to 0, 23
- ;[here start the diagonal block]
- mov cx, 6
- mov al, 254
- mov bl, 01000100b
- Diagonal_BLockR3:
- push dx ;push dx to stack to save old register
- ;part here creates the 12x2 block
- mov ah, 9h
- int 10h
- pop dx ;retrieve dx
- add dl , 4 ;x spacingm
- sub dh, 1 ;y spacing
- mov ah, 2h
- int 10h
- ;Comparison to cut the line
- cmp dh, 10
- jne Diagonal_BLockR3
- ;cursor position to screen space
- cursor_to 69, 23
- ;[here start the diagonal block]
- mov cx, 11
- mov al, 254
- mov bl, 01110111b
- Diagonal_BLock4:
- push dx ;push dx to stack to save old register
- ;part here creates the 12x2 block
- mov ah, 9h
- int 10h
- dec dh
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- ;added
- mov ah, 9h
- int 10h
- dec dh
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- pop dx ;retrieve dx
- sub dl , 4 ;x spacingm
- sub dh, 1 ;y spacing
- mov ah, 2h
- int 10h
- ;Comparison to cut the line
- cmp dh, 10
- jne Diagonal_BLock4
- ;cursor position to screen space
- cursor_to 74, 22
- ;[here start the diagonal RED block]
- mov cx, 6
- mov al, 254
- mov bl, 01000100b
- Diagonal_BLockR4:
- push dx ;push dx to stack to save old register
- ;part here creates the 12x2 block
- mov ah, 9h
- int 10h
- mov cx, 5
- pop dx ;retrieve dx
- sub dl , 4 ;x spacingm
- sub dh, 1 ;y spacing
- mov ah, 2h
- int 10h
- ;Comparison to cut the line
- cmp dh, 10
- jne Diagonal_BLockR4
- ;move cursor to x-35 to draw center line
- cursor_to 35, 0
- ;[here starts the cross]
- mov cx, 10
- mov al, 254
- mov bl, 01110111b
- CenterLine:
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- inc dh
- cmp dh,24
- jne CenterLine
- cursor_to 0, 9
- mov cx, 80
- mov al, 254
- mov bl, 01110111b
- MiddleLine:
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- inc dh
- cmp dh,15
- jne MiddleLine
- cursor_to 36, 0
- mov cx, 8
- mov al, 254
- mov bl, 01000100b
- CenterLineR:
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- inc dh
- cmp dh,24
- jne CenterLineR
- cursor_to 0, 10
- mov cx, 80
- mov al, 254
- mov bl, 01000100b
- MiddleLineR:
- mov ah, 2h
- int 10h
- mov ah, 9h
- int 10h
- inc dh
- cmp dh,14
- jne MiddleLineR
- ;move cursor to the end
- cursor_to 0, 23
- ;[Exiting program]
- mov ah, 4ch
- mov al, 0h
- int 21h
- code ends
- end start
Advertisement
Advertisement