Category : HD Utilities
Archive   : EDDTV400.ZIP
Filename : CMOSCHKS.ASM

 
Output of file : CMOSCHKS.ASM contained in archive : EDDTV400.ZIP
.286 ; ENABLE 80286 OP CODES
.XLIST
PAGE 80,120
PAGE
TITLE ŠŽ CMOSCHKS - CONFIGURATION MEMORY (CMOS) CHECKSUM”
.LIST
SUBTTL ROUTINE TO CLACULATE CONFIGURATION (CMOS) MEMORY CHECKSUM
COMMENT *

CMOSCHKS - VERSION 1.00

Copyright 1987,1988 Don Gentry

A limited license is granted to all users of this program,
to make copies of this program, and distribute them to
other users, on the following conditions:

1. The notice on this page is not to be removed or altered

2. No fee is to be charged for copying or distributing
the program.

3. No warranty of any kind is offered. This program is offered
on an "AS IS" basis. Each user should verify that it meets
his needs and verify correct operation.

4. No further restrictions on redristribution of any kind may
be required. This includes, but is not limited to,
COMPUSERVE or other program distribution services,
by electronic or other means.

FOR HELP OR SUGGESTIONS WRITE:

DON GENTRY
183 BELLEGROVE CIRCLE
BRANDON, MS 39042

OR CALL (601) 992-0577
*
PAGE
;-----------------------------------------------------------------------
;
; PROCEDURE CMOSCHKS
;
; PURPOSE:
; CALCULATE A CHECKSUM FOR CONFIGURAATION (CMOS) MEMORY
;
; PARAMETERS:
; DS:DX - POINTER TO A 32 BYTE AREA TO CONTAINING
; THE CONTENTS OF CMOS MEMORY BYTES
; 10 - 2F
;
; OUTPUT:
; THE CHECKSUM BYTES (2E-2F) ARE UPDATED TO REFLECT
; THE DATA IN YHE CMOS MEMORY AREA
;
;-----------------------------------------------------------------------
PUBLIC CMOSCHKS ; TELL THE LINKER ABOUT US
;
; ----- EQUATES FOR EASE OF CODING
;
;
CMC_CODE SEGMENT PUBLIC 'CODE' ; IDENTIFY THE CODE SEGMENT
ASSUME CS:CMC_CODE ; INFORM THE ASSEMBLER
CMOSCHKS PROC FAR ; IDENTIFY THE PROCEDURE
JMP CMC_GO ; JUMP OVER MODULE ID
DB 8 ; LENGTH OF ID
DB 'CMOSCHKS' ; MODULE EYE-CATCHER
DB 'V1M0' ; VERSION & MOD LEVEL
DB 'Copyright 1987,1988 Don Gentry'
CMC_GO: ; BEGIN ACTUAL LOGIC
PUSHA ; SAVE GENERAL REGS
MOV CX,02DH ; GET END OF CHKSUM AREA
MOV AX,0 ; CLEAR CHKSUM ACCUMULATOR
MOV BX,DX ; GET BASE TO CMOS DATA AREA
MOV SI,00H ; ZERO OUR INDEX
CMC_LOOP: ; CHKSUM CLACULATION LOOP
MOV DX,00H ; ZERO DX FOR WORK REG
MOV DL,DS:[BX+SI] ; GET A BYTE
ADD AX,DX ; ADD IT TO THE CHKSUM
CMP CX,010H ; ALL BYTES DONE ?
JE CMC_SAVE ; ...YES - EXIT LOOP
INC SI ; ADD TO THE INDEX FOR NEXT BYTE
LOOP CMC_LOOP ; ...NO - LOOP 'TIL DONE
CMC_SAVE: ; SAVE THE CHKSUM
MOV DS:01EH[BX],AH ; SAVE LOW BYTE
MOV DS:01FH[BX],AL ; SAVE HIGH BYTE
POPA ; RESTORE REGISTERS
;
; ----- RETURN TO CALLER
;
RET ; RETURN
CMOSCHKS ENDP ; END OF PROCEDURE
CMC_CODE ENDS ; END OF SEGMENT
END


  3 Responses to “Category : HD Utilities
Archive   : EDDTV400.ZIP
Filename : CMOSCHKS.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/