Ignore:
Timestamp:
Nov 4, 2009, 4:21:24 PM (16 years ago)
Author:
pasha
Message:

Rebuild buffers supply, fix DDCMD_WRITE with len=0 in WAVE chain, remove/add debug output, change DebugInt3 for debug/nondebug version, move unused code to unused directore

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OCO/trunk/drv16/memutil.asm

    r33 r468  
    9393    ; save registers
    9494        push   cx
    95         push   bx
     95;PS+++        push   bx
    9696        push   ds
    9797        push   es
     
    101101    ; store number of bytes to transfer and calculate number of double words
    102102    ; and set of transfer value
    103         mov    bx,BUF1_LEN
    104         mov    cx,bx
     103;PS+++        mov    bx,BUF1_LEN
     104;PS+++        mov    cx,bx
     105        mov    cx,BUF1_LEN                    ;PS+++
    105106        shr    cx,2
    106107
     
    120121
    121122    ; transfer number of odd bytes
    122         mov    cx,bx
     123;PS+++        mov    cx,bx
     124        mov    cx,BUF1_LEN                    ;PS+++
    123125        and    cx,03h
     126        or     cx,cx                          ;PS+++
     127        jz     short @@NoPad                  ;PS+++
    124128        rep    movsb
    125 
     129@@NoPad:                                      ;PS+++
    126130    ;set up return value and restore registers
    127131        pop    di
     
    129133        pop    es
    130134        pop    ds
    131         pop    bx
     135;PS+++        pop    bx
    132136        pop    cx
    133         pop    bp
    134 
     137;PS+++        pop    bp
     138        leave                                  ;PS+++
    135139   ;done
    136140        ret
     
    143147; the fill value as parameters on the stack.
    144148;    The function does not return a value.
    145 
     149;PS+++ Where is used now?
     150ifdef WhereIsUsed
    146151public _ddmemfill
    147152_ddmemfill proc near
     
    157162
    158163    ; save registers
    159         push   bx
     164;PS+++        push   bx
    160165        push   cx
    161166        push   es
     
    164169    ; store number of bytes to transfer and calculate number of double words
    165170    ; and set of transfer value
    166         mov    bx,BUF2_LEN
    167         mov    cx,bx
     171;PS+++        mov    bx,BUF2_LEN
     172;PS+++        mov    cx,bx
     173        mov    cx,BUF2_LEN                            ;PS++
    168174        shr    cx,2
    169175
    170176    ; set size in bytes of object to be allocated
    171         mov    es,DEST2_HIGH
     177        mov    es,DEST2_HIGH               
    172178        mov    di,DEST2_LOW
    173179
    174180    ; set up value
    175         mov    ax,VALUE2
     181;PS+++        mov    ax,VALUE2                         
     182        mov    al,VALUE2                          ;PS+++
     183        mov    ah,ah                              ;PS+++
     184        push   ax                                 ;PS+++
    176185        shl    eax,010h
    177         mov    ax,VALUE2
     186;PS+++        mov    ax,VALUE2
     187        pop    ax                                 ;PS+++
    178188
    179189    ; set up transfer direction
     
    184194
    185195    ; transfer number of odd bytes
    186         mov    cx,bx
     196;PS+++        mov    cx,bx
     197        mov    cx,BUF2_LEN                            ;PS++
    187198        and    cx,03h
    188199        rep    stosb
     
    192203        pop    es
    193204        pop    cx
    194         pop    bx
    195         pop    bp
    196 
     205;PS+++        pop    bx
     206;PS+++        pop    bp
     207        leave
    197208   ;done
    198209        ret
    199210_ddmemfill endp
     211endif
    200212
    201213_TEXT       ENDS
Note: See TracChangeset for help on using the changeset viewer.