SPIN.OBJ 1/2

 BBS: Inland Empire Archive
Date: 02-11-93 (10:55)             Number: 393
From: MARK BUTLER                  Refer#: NONE
  To: TOM HAMMOND                   Recvd: NO  
Subj: SPIN.OBJ  1/2                  Conf: (2) Quik_Bas
Once upon a time Tom Hammond uttered these sage words to All:

 TH> I'd appreciate a little direction here, if possible.
 TH> My problem is that the program contains some in-line code..

 Ok Tom this program reminds me a lot of a gw-basic program I saw some
 time ago that I derived SPIN.OBJ from by converting the data into a
 BINfile and then disassembling it. As a matter of fact I *think* the
 program you posted _is_ that very same program if I'm not mistaken.
 Anyway, here's what I came up with to get QB compatible 'spin' subs
 for drives A: and B:....

==========================8< Cut Here 8<=============================
         page   ,132
        .model  medium, basic
        .code
;
; QuickBASIC declarations...
; DECLARE SUB SpinA ()
; DECLARE SUB SpinB ()
;
; These routines will spin drives A: or B: long enough for a
; good cleaning. -MHB
;
        public  SpinA, SpinB
SpinA   proc
        xor    ax,ax
        int    1ah
        push   cx
        push   dx
L00106:
        mov    ax,0401h
        mov    cx,0001h
        mov    dx,0000h
        int    13h
        xor    ax,ax
        int    1ah
        cmp    al,00h
        pop    bx
        pop    ax
        push   ax
        push   bx
        je     l00124
        add    bx,00b0h
        adc    ax,0018h
L00124:
        add    bx,0222h
        adc    ax,0000h
        mov    si,010bh
        xor    byte ptr [si],27h
        cmp    ax,cx
        jnbe   l00106
        cmp    bx,dx
        jnbe   l00106
        pop    ax
        pop    ax
        xor    ax,ax
        int    13h
        ret
SpinA   endp

SpinB   proc
        xor    ax,ax
        int    1ah
        push   cx
        push   dx
H00106:
        mov    ax,0401h
        mov    cx,0001h
        mov    dx,0001h
        int    13h
        xor    ax,ax
        int    1ah
        cmp    al,00h
        pop    bx
        pop    ax
        push   ax
        push   bx
        je     h00124
        add    bx,00b0h
        adc    ax,0018h
H00124:
        add    bx,0222h
        adc    ax,0000h
        mov    si,010bh
        xor    byte ptr [si],27h
        cmp    ax,cx
        jnbe   h00106
        cmp    bx,dx
        jnbe   h00106
        pop    ax
        pop    ax
        xor    ax,ax
        int    13h
        ret
SpinB   endp
        end
==========================8< Cut Here 8<=============================
 For those of you that do not have MASM or TASM the next message
 contains a debug script that you can recreate SPIN.OBJ from.

 >>>Continued in the next message

--- timEd/B7 * I don't believe in miracles... I depend on them
 * Origin:  Terminal Oasis, Portland OR  (1:105/330.5)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET