Skip to content

Instantly share code, notes, and snippets.

@gnacu
Created January 23, 2025 21:27
Show Gist options
  • Save gnacu/4c844d67ab8c1c2d2fa1036ea93d2296 to your computer and use it in GitHub Desktop.
Save gnacu/4c844d67ab8c1c2d2fa1036ea93d2296 to your computer and use it in GitHub Desktop.
pgfetch_ = $1b
; RegPtr -> C64 Memory Buffer to fetch
; C <- Set on failure to fetch
; C <- Clr on successful fetch
pgstash_ = $1e
; RegPtr -> C64 Memory Buffer to stash
; C <- Set on failure to stash
; C <- Clr on successful stash
;---------------------------------------
;memory.lib routines (not in KERNAL)
realloc_ = $03
; A -> Memory pool (start page)
; RegPtr -> Ptr returned from malloc
; memsize -> Resize to 16-bit length
; C <- Set on error
; RegPtr <- Pointer to resized memory
bkfree_ = $06
; Y -> Start bank number (normal)
; X -> Number of banks
; C <- Failure (bankmap not changed)
; C <- Success
;Fails if the range attempting to be
;freed contains any allocation type
;other than the current App's reufrzbk.
bkalloc_ = $09
; X -> Size in 64K banks
; Y <- Start bank number (normal)
; C <- Set on failure
; C <- Clr on success
;Fails if a contiguous range of free
;banks of size X cannot be found.
;Allocated banks are marked as alloc'd
;by the current App's reufrzbk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment