;Source Code for DOC1.COM.
;By Megaton Man
;5/26/89
;Call Roach Motel
;818-369-2083
;12/24/9600
;NAPPA #14
;Sysop : Black Flag


Code      Segment
          Org 100h
          Assume CS:Code,DS:Code

Start:    Jmp Begin

;%%%%%%%%%%%%%%%%%%%%%%%%%%%% Variables %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;
Message   db  0dh,0ah,'File Name : DOC1.COM',0dh,0ah
          db  'by Megaton Man',0dh,0ah
          db   0dh,0ah
          db  'You must use ALL UPCASE when typing PASSWORD',0dh,0ah
          db  'ENTER THE PASSWORD : '
          db  '$'

Crack     db  0dh,0ah,0dh,0ah,'Ok, The game is Cracked!$'
Eat       db  0dh,0ah,0dh,0ah,'The game is NOT CRACKED!$'
Password  db  'MEGATON MAN'
INPUT     db  50 dup (0)
;======================================================================;

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Program %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;
Begin:
          Call   ASK
          Or     ax,ax
          JNE    Good
          Call   Eatit
    Good: Call   Cracked

          Int    20h
;======================================================================;

;%%%%%%%%%%%%%%%%%%%%%%%%%%% Sub Routines %%%%%%%%%%%%%%%%%%%%%%%%%%%%%;
ASK       Proc   Near
          Mov    AH,09h
          Mov    DX,offset Message
          INT    21h

          MOv    SI,offset INPUT
          Call   INLine

          Lea    SI,INPUT
          Lea    DI,Password
          MOV    CX,0bh
          REPE   CMPSB
          MOV    AX,0
          OR     CX,CX
          JNE    ASK1
          MOV    AX,0001
ASK1:     RET
ASK       EndP

Cracked   Proc   Near
          Mov    AH,09h
          Mov    DX,offset Crack
          Int    21h
          INT    20h
Cracked   endP

EatIt     Proc   Near
          Mov    AH,09h
          Mov    DX,offset Eat
          Int    21h
          INt    20h
Eatit     Endp

INLine    Proc   Near
   read:  Xor    ax,ax
          int    16h
          mov    [si],al   ;save char
          cmp    al,0dh
          je     bail
          inc    si
          mov    dl,al
          mov    ah,02h
          int    21h
          jmp    read
    bail: ret
INline    ENDP

;======================================================================;

Code      Ends
          End    Start 