home *** CD-ROM | disk | FTP | other *** search
- ;##############################
- ;# Example 1.0 - Memory Banks #
- ;##############################
- ; By Steven Matty
- ;
- ; This program runs through most of the memory bank commands
- ; e.g. BLoad / BSave / Reserve / CopyBank / Erase / EraseAll / Start / Length
-
- NPrint "Loading S:startup-sequence to Bank 0"
- success=BLoad("S:startup-sequence",0)
- If success
- NPrint "Okay!"
- Else
- NPrint "Error!"
- End
- EndIf
-
- VWait 50
-
- NPrint "Saving Bank 0 To RAM:Plop"
- success=BSave("Ram:Plop",0)
- If success
- NPrint "Okay!"
- Else
- NPrint "Error!"
- End
- EndIf
-
- VWait 50
-
- NPrint "Copying Bank 0 to Bank 1.."
- success=CopyBank(0,1)
- If success
- NPrint "Okay!"
- Else
- NPrint "Error!"
- End
- EndIf
-
- VWait 50
-
- NPrint "Allocating Bank 1 (CHIP RAM).."
- success=Reserve(1,Length(0),%10)
- If success
- NPrint "Okay!"
- Else
- NPrint "Error!"
- End
- EndIf
-
- VWait 50
-
- NPrint "Erasing Bank 1.."
- Erase 1
-
- VWait 50
-
- NPrint "Allocating Bank 1 (4000 bytes PUBLIC RAM).."
- success=Reserve(1,4000)
- If success
- NPrint "Okay!"
- Else
- NPrint "Error!"
- End
- EndIf
-
- VWait 50
-
- NPrint "Start of Bank 0 = ",Start(0)
- NPrint "Length Of Bank 0 = ",Length(0)," bytes."
- NPrint "Start of Bank 1 = ",Start(1)
- NPrint "Length Of Bank 1 = ",Length(1)," bytes."
-
- VWait 50
-
- NPrint "Next Free Bank = ",NextBank(0)
-
- VWait 50
-
- NPrint "Erasing ALL Banks..."
- EraseAll
- NPrint "Press the mouse button..."
- MouseWait
- End
-
-
-