Page    60,132
;diskwr.asm -- writes one sector to absolute sector 360 on drive A
;Uses BIOS interrupt 26h
stk     segment stack                ; set up a stack
        dw      64 dup(?)
stk     ends

data    segment
s       db      '01234abcdefg'
        db      500 dup('$')
data    ends

code    segment
        assume  ds:data, cs:code
main    proc    far                  ; Bookkeeping...
        push    ds                   ; instructions--
        sub     ax,ax                ; Necessary...
        push    ax                   ; under DOS
        mov     ax,data
        mov     ds,ax
        mov     cx,1              ; 1 sector to write
        mov     al,0            ; drive 0 (A drive) 
        mov     dx,360          ; track*18 + sector
        mov     bx,offset s       ; address of write buffer
        int     26h               ; write it
        add     sp,2            ; even stack

        ret                          ; Return to DOS
main    endp         
code    ends
        end     main