Category : Files from Magazines
Archive   : VOL11N21.ZIP
Filename : MLPRINT3.INC

 
Output of file : MLPRINT3.INC contained in archive : VOL11N21.ZIP
; Subroutines for default .CNF file

; Copyright 1993 Jay Munro
; First Published in PC Magazine December 15, 1992

LoadDefaultValues Proc Near
;--- check for default file
Invoke Exist, Addr DefaultFile
Jc @F
Invoke OpenFile,Addr DefaultFile, 0 ;open default list file
Jc @F ;error, skip it.
Push AX ;save handle
Mov BX,AX ;put in BX to avoid INVOKE bug
Invoke Read, BX, ADDR Color, SaveSize ;read default values
Pop BX ;retrieve handle
Invoke Close, BX ;close file

Mov SI, Offset RetAddrSave ;get address of ret address save
Push DS
Pop ES
Mov BX, Offset RetLabel1Adr
Cld ;move forward
Mov CX, 6
MoveThemBytes:
Push CX
Mov CX,20 ;do 40 chars at a time (20 words)
Mov DI,[BX] ;get address to write to
Rep MovSw ;
Add BX,7 ;skip to the next address
Pop CX ;get line counter back
Loop MoveThemBytes
@@:
Ret
LoadDefaultValues EndP


SaveDefaultValues Proc Near
Push ES
Push DS
Pop ES
Mov DI, Offset RetAddrSave ;get address of ret address save
Mov BX, Offset RetLabel1Adr
Cld ;move forward
Mov CX, 6
MoveThemBytes2:
Push CX
Mov CX,20 ;do 40 chars at a time (20 words)
Mov SI,[BX] ;get address to write to
Rep MovSw
Add BX,7 ;skip to the next address
Pop CX ;get line counter back
Loop MoveThemBytes2
Invoke OpenFile, Addr DefaultFile, 3c00h ;open the default file
Push AX ;save handle
Mov BX,AX ;put in BX to avoid INVOKE bug
Invoke Write, BX, ADDR Color, SaveSize ;read default values
Pop BX ;retrieve handle
Invoke Close, BX ;close file
Pop ES
Ret
SaveDefaultValues EndP


  3 Responses to “Category : Files from Magazines
Archive   : VOL11N21.ZIP
Filename : MLPRINT3.INC

  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/