Skip to main content
5 of 7
added 9 characters in body
user5434231
  • 1.6k
  • 11
  • 12

#8086 machine code, 68 61 48 46 45 bytes 00000000 b2 30 be 82 00 ac eb 01 9c 88 c3 ac 3c 0d 74 16 |.0..........<.t.| 00000010 38 c3 74 f5 e3 04 b9 00 00 9c 77 05 9d 72 e9 eb |8.t.......w..r..| 00000020 07 9d 77 e4 eb 02 9d 42 b4 02 cd 21 c3 |..w....B...!.| 0000002d

Assembled from:

org 0x100 use16 mov dl, '0' mov si, 0x82 lodsb jmp b a: pushf b: mov bl, al lodsb cmp al, 0x0d je y cmp bl, al je b jcxz @f mov cx, 0 pushf @@: ja @f popf jb a jmp n @@: popf ja a jmp n y: popf inc dx n: mov ah, 0x02 int 0x21 ret 
user5434231
  • 1.6k
  • 11
  • 12