qa.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
   Example  Back  Contents  Index
──────────────────────────────────────────────────────────────────────────────
 
;* NewBlockSize - Adjusts size of allocated memory block.
;*
;* Shows:   DOS Function - 4Ah (Resize Memory Block)
;*
;* Params:  addr - Segment address of block
;*          resize - Requested block size in paragraphs
;*
;* Return:  Short integer error code
;*          0 if successful
;*          1 if error
 
NewBlockSize PROC \
        addr:WORD, resize:WORD
 
        mov     ax, addr                ; 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
                                    -♦-