Re: HLA is productive

From: Annie (annie_at_oal.com)
Date: 10/12/03


Date: Sun, 12 Oct 2003 08:36:19 +0000 (UTC)


On 2003-10-11 none@nowhere.com (Sinewave Phil) said:

> LOL. nice shotgun Annie! by the looks of it, a mossberg 500
> pump-action 12- guage "persuader". IMO one of the finest pumps
> ever made: milspec with dual extractors and action bars.
                                             _____
       To do a job right, you've ((( `\
       gotta have the proper tools. _ _`\ )
                                            (^ ) )
       I take no prisoners. Hehe! ~-( )
                                             _'((,,,)))
       Speaking of tools: awhile back, ,-' \_/ `\
       someone inquired about resetting ( , |
       a CMOS to the original ROM BIOS `-.-'`-.-'/|_|
       default settings. I put together \ / | |
       this little program from infor- =()=: / ,' aa
       mation that was posted elsewhere.

       It won't work in every case, but many ROM BIOSes will
       reset the CMOS to original defaults if you zero the
       CMOS's checksum. That's what this program does.

       If you're really stuck, and need to reset the CMOS to
       factory defaults, this might be worth a try.

       Bear in mind, though, that after using this program,
       you'll have to manually reconfigure the more mundane
       CMOS settings (date, time, floppy and hard drive
       parameters, etc.). So be certain you know what you're
       doing. This isn't for computer newbies or WinDoze users.
       Hehehe!

;
; CLR-CMOS.ASM [For DOS]
;
; Sets the CMOS checksum to 0. This will cause
; some (but not all) BIOSes to reset the CMOS --
; including the password -- to default values.
;
; Based on DEBUG code posted to Usenet by
; B. Sathish Kumar <meet_sathish@yahoo.com>
;
; Freeware from Annie
;
; Assembles as-is with the A86 assembler.
; For other assemblers, you'll have to add the usual
; additional proprietary nonsense.
;
code segment ;start of code segment
        org 100h ;DOS .COM file
;
        mov dx,offset msg1 ;point DX to screen message
        call process
;
        mov dx,offset msg2 ;point DX to screen message
        call process
;
        mov dx,offset msg3 ;point DX to screen message
        call process
;
; Here's where we actually zero the CMOS checksum.
;
        mov dx,70h
        mov al,2Eh
        out dx,al
        inc dx
        xor ax,ax
        out dx,al
        dec dx
        mov al,2Fh
        out dx,al
        inc dx
        xor ax,ax
        out dx,al
;
        mov dx,offset msg4 ;point DX to screen message
exit:
        call prt_str ;go print it
        int 20h ;exit to DOS
;
; Print a screen message, sound a 'beep,' get user keypress,
; and respond appropriately to that keypress.
;
process:
        call prt_str ;go print it
        call beep ;go sound a 'beep'
        mov dx,offset abort ;point DX to screen message
        mov ah,0 ;function 0 - wait for keypress
        int 16h ;call ROM BIOS keyboard services
        and al,5Fh ;convert to upper-case
        cmp al,'Y' ;was 'Y' pressed?
        jne exit ;no, so go exit
        ret ;return to caller
;
; Sound a 'beep' tone through the PC speaker.
; (Not processor-speed dependent; operates
; identically on any i86, regardless of speed.)
;
beep:
        mov al,10110110xb ;load control word
        mov dx,43h
        out dx,al ;send it
        mov ax,10000 ;tone frequency
        mov dx,42h
        out dx,al ;send LSB
        mov al,ah ;move MSB to AL
        out dx,al ;save it
        in al,61h ;get port 61 state
        or al,00000011xb ;turn on speaker
        mov dx,61h
        out dx,al ;speaker on now
        call delay
        and al,11111100xb ;clear speaker enable
        out dx,al ;speaker off now
        ret
;
; Delay for 12/18ths of a second.
;
delay:
        push dx ;preserve DX
        mov ah,00h ;function 0 - get system timer tick
        int 01Ah ;call ROM BIOS time-of-day services
        add dx,12 ;add our delay value to DX
        mov bx,dx ;store result in BX
pozz:
        int 01Ah ;call ROM BIOS time-of-day services
        cmp dx,bx ;has the delay duration passed?
        jl pozz ;no, so go check again
        pop dx ;restore DX
        ret ;return to caller
;
; Our 'print string' routine.
;
prt_str:
        mov ah,9 ;function 9 - print string
        int 21h ;call DOS services
        ret ;return to caller
;
; Our screen messages.
;
msg1 db 13,10,'This program sets the CMOS checksum to 0, which will'
        db 13,10,'cause some (but not all) BIOSes to reset the CMOS to'
        db 13,10,'default values. Is this what you want to do (Y/N)? $'
msg2 db 13,10,10,'CAUTION! After using this program, you''ll have to'
        db 13,10,'manually reconfigure your CMOS settings. Proceed (Y/N)?'
        db ' $'
msg3 db 13,10,10,'WARNING! LAST CHANCE! All current CMOS settings will'
        db 13,10,'be lost! Are you SURE you know what you''re doing (Y/N)'
        db '? $'
msg4 db 13,10,10,205,16,' Okay, the CMOS checksum has been set to 0.'
        db 13,10,' Reboot your computer now, and good luck!',13,10,'$'
abort db 13,10,10,205,16,' Program aborted; no action taken.',13,10,'$'
;
end