Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
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
                                    -♦-