Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
4 edited body
source | link

x86 real-mode machine code for DOS COM, 69 65 63 62 bytes

Iceland flag produced

The code is meant to be executed as a DOS COM executable.

Special thanks

  • meden, saved four bytes.
  • meden, saved two bytes and removed the flickering.

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD      10 BE 23 01 AD 91 AD 91 
AC E3 FE 60 30 ED F3 AA      61 81 C7 40 01 FE CD 75 
F2 EB E9 FA B4 00 00 09      28 B4 46 00 0F FA 28 80 
57 0F 14 B4 0C 50 00 FA      14 0C 00 64 00 00

Assembly source

Source is for NASM.

ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov si, data


_draw:
 lodsw
 xchg ax, cx

 lodsw
 xchg ax, di

 lodsb

_cycle:
 jcxz _cycle

 ;al = color
 ;cx;cl = col
 ;dx;ch = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, 320
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 

        db 250d
        db 180d
        dw 0000h
        db 09h


        db 40d
        db 180d
        dw 0070d
        db 0fh


        db 250d
        db 40d
        dw 22400d
        db 0fh

        db 20d
        db 180d
        dw 80d
        db 0ch


        db 250
        db 20
        dw 25600d 
        db 0ch


        dw 0000h

x86 real-mode machine code for DOS COM, 69 65 63 62 bytes

Iceland flag produced

The code is meant to be executed as a DOS COM executable.

Special thanks

  • meden, saved four bytes.
  • meden, saved two bytes and removed the flickering.

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD      10 BE 23 01 AD 91 AD 91 
AC E3 FE 60 30 ED F3 AA      61 81 C7 40 01 FE CD 75 
F2 EB E9 FA B4 00 00 09      28 B4 46 00 0F FA 28 80 
57 0F 14 B4 0C 50 00 FA      14 0C 00 64 00 00

Assembly source

Source is for NASM.

ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov si, data


_draw:
 lodsw
 xchg ax, cx

 lodsw
 xchg ax, di

 lodsb

_cycle:
 jcxz _cycle

 ;al = color
 ;cx = col
 ;dx = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, 320
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 

        db 250d
        db 180d
        dw 0000h
        db 09h


        db 40d
        db 180d
        dw 0070d
        db 0fh


        db 250d
        db 40d
        dw 22400d
        db 0fh

        db 20d
        db 180d
        dw 80d
        db 0ch


        db 250
        db 20
        dw 25600d 
        db 0ch


        dw 0000h

x86 real-mode machine code for DOS COM, 69 65 63 62 bytes

Iceland flag produced

The code is meant to be executed as a DOS COM executable.

Special thanks

  • meden, saved four bytes.
  • meden, saved two bytes and removed the flickering.

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD      10 BE 23 01 AD 91 AD 91 
AC E3 FE 60 30 ED F3 AA      61 81 C7 40 01 FE CD 75 
F2 EB E9 FA B4 00 00 09      28 B4 46 00 0F FA 28 80 
57 0F 14 B4 0C 50 00 FA      14 0C 00 64 00 00

Assembly source

Source is for NASM.

ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov si, data


_draw:
 lodsw
 xchg ax, cx

 lodsw
 xchg ax, di

 lodsb

_cycle:
 jcxz _cycle

 ;al = color
 ;cl = col
 ;ch = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, 320
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 

        db 250d
        db 180d
        dw 0000h
        db 09h


        db 40d
        db 180d
        dw 0070d
        db 0fh


        db 250d
        db 40d
        dw 22400d
        db 0fh

        db 20d
        db 180d
        dw 80d
        db 0ch


        db 250
        db 20
        dw 25600d 
        db 0ch


        dw 0000h
3 added 139 characters in body
source | link

x86 real-mode machine code for DOS COM, 69 6565 63 62 bytes

Iceland flag produced

The program draw the flags continuously, thus flickering. The code is meant to be executed as a DOS COM executable.

Special thanks

  • meden, saved four bytes.
  • meden, saved two bytes and removed the flickering.

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD     10 BB 40 0110 BE 2423 01 AD 
9791 AD 91  
AC E3 F6FE 60 30 ED F3 AA   ED F3 AA 61 0181 DFC7 40 01 FE CD 
 75 F4 EB
F2 EB 00 00E9 FA B4 00 00 09  09 46 00  28 B4 0F46 8000 570F 
 FA 28 0F80 50
57 000F 14 B4 0C 50 00 FA  00 64 FA  14 0C 00 0064 00 
 00

Assembly source

Source is for NASM.

    ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov bx, 320

_cycle:
 mov si, data


_draw:
 lodsw
 xchg diax, axcx

 lodsw
 xchg cxax, axdi

 lodsb

_cycle:
 jcxz _cycle

 ;al = color
 ;cx = col
 ;dx = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, bx320
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 
        dw 0000h
        db 250d
        db 180d
        dbdw 09h
0000h
        dwdb 0070d09h


        db 40d
        db 180d
        dbdw 0fh
0070d
        dwdb 22400d0fh


        db 250d
        db 40d
        dbdw 0fh
22400d
        dwdb 80d0fh

        db 20d
        db 180d
        dbdw 0ch
80d
        dw 25600d       db 0ch


        db 250
        db 20
        dbdw 0ch
25600d 
        dwdb 0000h0ch


        dw 0000h

x86 real-mode machine code for DOS COM, 69 65 bytes

Iceland flag produced

The program draw the flags continuously, thus flickering. The code is meant to be executed as a DOS COM executable.

Special thanks

  • meden, saved four bytes

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD     10 BB 40 01 BE 24 01 AD 
97 AD 91 AC E3 F6 60 30     ED F3 AA 61 01 DF FE CD 
 75 F4 EB EB 00 00 FA B4     09 46 00 28 B4 0F 80 57 
 FA 28 0F 50 00 14 B4 0C     00 64 FA 14 0C 00 00 00 
 00

Assembly source

Source is for NASM.

    ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov bx, 320

_cycle:
 mov si, data


_draw:
 lodsw
 xchg di, ax

 lodsw
 xchg cx, ax

 lodsb

 jcxz _cycle

 ;al = color
 ;cx = col
 ;dx = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, bx
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 
        dw 0000h
        db 250d
        db 180d
        db 09h

        dw 0070d
        db 40d
        db 180d
        db 0fh

        dw 22400d
        db 250d
        db 40d
        db 0fh

        dw 80d
        db 20d
        db 180d
        db 0ch

        dw 25600d        
        db 250
        db 20
        db 0ch

        dw 0000h
        dw 0000h

x86 real-mode machine code for DOS COM, 69 65 63 62 bytes

Iceland flag produced

The code is meant to be executed as a DOS COM executable.

Special thanks

  • meden, saved four bytes.
  • meden, saved two bytes and removed the flickering.

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD      10 BE 23 01 AD 91 AD 91  
AC E3 FE 60 30 ED F3 AA      61 81 C7 40 01 FE CD 75 
F2 EB E9 FA B4 00 00 09      28 B4 46 00 0F FA 28 80 
57 0F 14 B4 0C 50 00 FA      14 0C 00 64 00 00

Assembly source

Source is for NASM.

ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov si, data


_draw:
 lodsw
 xchg ax, cx

 lodsw
 xchg ax, di

 lodsb

_cycle:
 jcxz _cycle

 ;al = color
 ;cx = col
 ;dx = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, 320
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 

        db 250d
        db 180d
        dw 0000h
        db 09h


        db 40d
        db 180d
        dw 0070d
        db 0fh


        db 250d
        db 40d
        dw 22400d
        db 0fh

        db 20d
        db 180d
        dw 80d
        db 0ch


        db 250
        db 20
        dw 25600d 
        db 0ch


        dw 0000h
2 added 172 characters in body
source | link

x86 real-mode machine code for DOS COM, 6969 65 bytes

Iceland flag produced

The program draw the flags continuously, thus flickering. The code is meant to be executed as a DOS COM executable.

Special thanks

  • meden, saved four bytes

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD     10 BB 40 01 BE 2824 01 AD 
89 C797 AD 89 C191 AC 85 C9 E3 F6 60 30 74 F2 60 30 ED F3 AA 61 
 01 DF FE CD  
75 F4 EB E7    EB 00 00 FA B4     09 46 00 28 
 B4 0F 80 57  
FA 28 0F 50     00 14 B4 0C     00 64 FA 14
  0C 00 00 00  
00

Assembly source

Source is for NASM.

    ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov bx, 320

_cycle:
 mov si, data


_draw:
 lodsw
 movxchg di, ax

 lodsw
 movxchg cx, ax

 lodsb

 test cx, cx
 jz SHORTjcxz _cycle

 ;al = color
 ;cx = col
 ;dx = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, bx
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 
        dw 0000h
        db 250d
        db 180d
        db 09h

        dw 0070d
        db 40d
        db 180d
        db 0fh

        dw 22400d
        db 250d
        db 40d
        db 0fh

        dw 80d
        db 20d
        db 180d
        db 0ch

        dw 25600d        
        db 250
        db 20
        db 0ch

        dw 0000h
        dw 0000h

x86 real-mode machine code for DOS COM, 69 bytes

Iceland flag produced

The program draw the flags continuously, thus flickering. The code is meant to be executed as a DOS COM executable.

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD     10 BB 40 01 BE 28 01 AD 
89 C7 AD 89 C1 AC 85 C9     74 F2 60 30 ED F3 AA 61 
 01 DF FE CD 75 F4 EB E7     00 00 FA B4 09 46 00 28 
 B4 0F 80 57 FA 28 0F 50     00 14 B4 0C 00 64 FA 14
 0C 00 00 00 00

Assembly source

Source is for NASM.

ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov bx, 320

_cycle:
 mov si, data


_draw:
 lodsw
 mov di, ax

 lodsw
 mov cx, ax

 lodsb

 test cx, cx
 jz SHORT _cycle

 ;al = color
 ;cx = col
 ;dx = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, bx
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 
        dw 0000h
        db 250d
        db 180d
        db 09h

        dw 0070d
        db 40d
        db 180d
        db 0fh

        dw 22400d
        db 250d
        db 40d
        db 0fh

        dw 80d
        db 20d
        db 180d
        db 0ch

        dw 25600d        
        db 250
        db 20
        db 0ch

        dw 0000h
        dw 0000h

x86 real-mode machine code for DOS COM, 69 65 bytes

Iceland flag produced

The program draw the flags continuously, thus flickering. The code is meant to be executed as a DOS COM executable.

Special thanks

  • meden, saved four bytes

Machine code (in hex bytes)

68 00 A0 07 B8 13 00 CD     10 BB 40 01 BE 24 01 AD 
97 AD 91 AC E3 F6 60 30     ED F3 AA 61 01 DF FE CD  
75 F4 EB EB 00 00 FA B4     09 46 00 28 B4 0F 80 57  
FA 28 0F 50 00 14 B4 0C     00 64 FA 14 0C 00 00 00  
00

Assembly source

Source is for NASM.

    ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov bx, 320

_cycle:
 mov si, data


_draw:
 lodsw
 xchg di, ax

 lodsw
 xchg cx, ax

 lodsb

 jcxz _cycle

 ;al = color
 ;cx = col
 ;dx = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, bx
 dec ch
 jnz SHORT rect

jmp SHORT _draw


data: 
        dw 0000h
        db 250d
        db 180d
        db 09h

        dw 0070d
        db 40d
        db 180d
        db 0fh

        dw 22400d
        db 250d
        db 40d
        db 0fh

        dw 80d
        db 20d
        db 180d
        db 0ch

        dw 25600d        
        db 250
        db 20
        db 0ch

        dw 0000h
        dw 0000h
1
source | link