Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
NewBlockSize
 Map                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
;* NewBlockSize - Adjusts size of allocated memory block.
;*
;* Shows:   DOS Function - 4Ah (Resize Memory Block)
;*
;* Params:  Adr - Segment address of block
;*          Resize - Requested block size in paragraphs
;*
;* Return:  Short integer error code
;*          0 if successful
;*          1 if error
 
NewBlockSize PROC,
        Adr:WORD, Resize:WORD
 
        mov     ax, Adr                 ; Get block address
        mov     es, ax                  ; Point ES to block
        mov     bx, Resize              ; New block size
        mov     ah, 4Ah                 ; Function number
        int     21h                     ; Resize Memory Block
        ret
 
NewBlockSize ENDP
                                    -♦-