home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / texts / cell_nfo / 4711-mod.asm < prev    next >
Assembly Source File  |  1993-04-17  |  4KB  |  71 lines

  1. ; **********************************************************************
  2. ; *                                                                    *
  3. ; *                This is 4711 mod for the Oki 900 Phone              *
  4. ; *                                                                    *
  5. ; *                         by   G.R.A.S.P.  This                      *
  6. ; *                                                                    *
  7. ; *      There are a few changes you will have to make to your binary  *
  8. ; *  in order for this code to work for you.  A you need to get        *
  9. ; *  around the check summs, if you can not do that, you should not    *
  10. ; *  have this.                                                        *  
  11. ; *                                                                    *
  12. ; *     Look at $0221, you will see 12073D, Change this to 12A100, do  *
  13. ; *  this to get the code to run.                                      * 
  14. ; *                                                                    *
  15. ; **********************************************************************
  16.  
  17. begin:  .org $a100
  18. eleetmod:mov dptr, #$bfaf      ; Security feature for phone
  19.         movx a, @dptr             ; Load up secured bit
  20.         mov $60, a                ; Lets save this for a second
  21.         mov dptr, #$a6aa          ;      \   Get REAL ESN 
  22.         movx a, @dptr             ;      /  ESN (Encrypted)
  23.         xrl $60, a                ; XOR The two
  24.         xrl $60, #$ff             ; better be $00
  25.         mov a, $60                ; 
  26.         cjne a, #$00, nothing      ; Did someone try to copy the chip?
  27.         ljmp eleetesn              ; Pass, go on
  28. ;   *******************************
  29. nothing:ljmp $073d           ; Normal Phone
  30. eleetesn:mov dptr, #$bf2c         ; NAM Select  
  31.         movx a, @dptr             ; Load that data up
  32.         cjne a, #$01, try2      ; 
  33.         mov dptr, #$be8e          ; ESN Location #1  $be8e-$be91
  34.         ljmp letsgo               ;
  35. try2:    cjne a, #$02, try3        ;
  36.         mov dptr, #$be93          ; ESN Location #2  $be93-$be96
  37.         ljmp letsgo               ;
  38. try3:    cjne a, #$03, try4      ;  
  39.         mov dptr, #$be98          ; ESN Location #3  $be98-$be9b
  40.         ljmp letsgo               ;
  41. try4:    cjne a, #$04, its5       ;  
  42.         mov dptr, #$be9d      ; ESN Location #4  $be9d-$bea0
  43.         ljmp letsgo               ;
  44. its5:    mov dptr, #$bea2          ; ESN location #5  $BEA2-$BEA5
  45. letsgo: mov r0, #$60              ; Starting location
  46.         mov r1, #$04              ; Loop 4 times
  47. cploop: movx a, @dptr             ; Loader up
  48.         mov @r0, a                ; Save in RAM so we can free up DPTR
  49.     inc dptr                  ; Next address
  50.         inc r0                    ; Next RAM location
  51.         djnz r1, cploop           ; Loop it!
  52.                   ; Setup for the ESN write to working storage 
  53.         mov dptr, #$bec2          ; ESN working storage location
  54.         mov r0, #$60              ; RAM starting location
  55.         mov r1, #$04              ; Number of loops
  56.                                   ; Write ESN to working storage 
  57. wrloop: mov a, @r0                ; Loader up
  58.         lcall $2ffb               ; Write A to @DPTR, for EEPROM
  59.         inc dptr                  ; Next address in working storage
  60.         inc r0                    ; Next RAM address
  61.         djnz r1, wrloop           ; Loop it!
  62.     mov r0, #$64              ;  \
  63.         mov r1, #$04              ;   | 
  64.         clr a                     ;   |      Clear 
  65. clwork: mov @r0, a                ;   |       ESN 
  66.         inc r0                    ;   |     workspace 
  67.         djnz r1, clwork           ;  /  
  68.         clr a                     ; 
  69.         ret                       ;  All set for F0N3 PhRaUd! 
  70. .END
  71.