This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:traps:trap_1:frtp [2008/07/22 15:25] (current)
norman created
Line 1: Line 1:
 +====== MT_FREE/SMS_FRTP ======
 +Find the maximum amount of free memory.
 +^Call Parameters^^Return Parameters^^
 +|D1.L|Unused |D1.L|Maximum free space in bytes.|
 +|D2.L|Unused |D2.L|Corrupted.|
 +|D3.L|Unused |D3.L|Corrupted.|
 +|A0.L|Unused |A0.L|Corrupted.|
 +|A1.L|Unused |A1.L|Corrupted.|
 +|A2.L|Unused |A2.L|Corrupted.|
 +|A3.L|Unused |A3.L|Corrupted.|
 +===== Errors =====
 +No errors are returned by this trap.
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * This trap returns the number of bytes in the biggest free area of Transient Program space or the number of bytes between SV_BASIC and SV_FREE minus 512 - whichever is the biggest.
 +  * Beware of the fact that by the time you have obtained the figure, you might still fail to allocate it all if another job has got there first and allocated some space for itself. LOL
 +===== Example =====
 +The following shows the use of this call :
 +mfree   moveq   #06,d0          ; MT_FREE/SMS_FRTP
 +        trap    #1              ; Find amount of free space 
 +        <do stuff here with the number of bytes in D1.L>
 +        :
 +        :
  • qdosmsq/traps/trap_1/frtp.txt
  • Last modified: 2008/07/22 15:25
  • by norman