Category : Utilities for DOS and Windows Machines
Archive   : SFREAK.ZIP
Filename : SFREAK.ASM

 
Output of file : SFREAK.ASM contained in archive : SFREAK.ZIP
Title Sfreak
PAGE 60,132
CGRP GROUP CSEG
CSEG SEGMENT PARA PUBLIC 'CODE'
ASSUME CS:CGRP,DS:CGRP,ES:CGRP
; DATE: 28-DEC-87
; VERSION: 1.0
CR EQU 0DH
LF EQU 0AH
ORG 0080H
BUFFER DB ?
ORG 0100H
MAIN PROC NEAR
MOV Cl,BYTE PTR [BUFFER] ;Get parm length
CMP Cl,3 ;Is there a parm?
JB INFORM ;If not, info them
XOR Dx,Dx
MOV Ax,WORD PTR [BUFFER+2] ;Get first HEX pair
CALL PACK ;ASCII to HEX Convert
OR Ah,Ah ;Check for errors
JNZ INFORM ;If so, info them
MOV Dl,Al ;Assume Lo for now
CMP Cl,5 ;Check for second parm
JB CHANGE ;If not, continue
XCHG Dh,Dl ;First would be Hi
MOV Ax,WORD PTR [BUFFER+4] ;Get second HEX pair
CALL PACK ;Convert it
OR Ah,Ah ;Check for errors
JNZ INFORM ;Tell'm what is wrong
MOV Dl,Al ;Slide Lo byte in
CMP Dx,0002H ;Check for TOO low
JB INFORM ;Tell'm
CHANGE: MOV Al,74H ;DMA access
OUT 43H,Al
MOV Al,Dl ;LSB of refresh rate
OUT 41H,Al
MOV Al,Dh ;MSB of refresh rate
OUT 41H,Al
JMP ENDIT
INFORM: MOV Ah,40H ;Set up for DOS call
MOV Bx,01H ;Handle 1 (CON)
MOV Cx,OFFSET MSGE - OFFSET MSGS
MOV Dx,OFFSET MSGS ;Start of message
INT 21H ;Do it
ENDIT: XOR Ah,Ah ;Exit function
INT 21H ;Bye
MSGS: DB 'Speed Freak 1.0 by Chazz Meredith 2-NOV-87',CR,LF
DB 'Derived from "SPEEDER" by Tom Hanlin',CR,LF
DB 'Released to Public Domain',CR,LF,LF
DB ' SFREAK rate',CR,LF,LF
DB 'Where rate is a two or four digit hex value 02 - FFFF.',CR,LF,LF
MSGE: DB 0
;
PACK: AND Ax,7F7FH ;Strip High bit
CALL PACK1 ;Convert first byte
XCHG Ah,Al ;Swap bytes
CALL PACK1 ;Convert second byte
ROL Al,1 ;Prep to roll into Al
ROL Al,1
ROL Al,1
ROL Al,1
ROR Ax,1 ;Roll Ah into Al
ROR Ax,1
ROR Ax,1
ROR Ax,1
RET
PACK1: SUB Ah,'0' ;First try 0-9
JS PACK2 ;If sign then error
CMP Ah,09H ;Check if 9 or less
JBE PACK3 ;If yes, leave
SUB Ah,'A'-'9'-1 ;Adjust for A-F
JS PACK2 ;If sign then error
CMP Ah,0FH ;Check if 'F' or less
JBE PACK3 ;If yes, leave
PACK2: MOV Ah,80H ;Set for error
PACK3: RET ;Return
MAIN ENDP
CSEG ENDS
END MAIN


  3 Responses to “Category : Utilities for DOS and Windows Machines
Archive   : SFREAK.ZIP
Filename : SFREAK.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/