15 September 2019, 13:57 | #1 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
CloseWorkbench_
Hi everyone,
since a week I'm checking out Blitzbasic2 - which is new for me and it's quite cool. Two sourcecodes I found do this at the very beginning (directly after WBStartup): Code:
For i=1 To 100:CloseWorkBench_:Next Why are they doing this - to free chipram for the program? The screen also is flashing for some seconds. |
15 September 2019, 16:15 | #2 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Yep, it's usually done to save on chip RAM - if there's a colourful Workbench screen open it could be using a significant amount of chip RAM. I don't know why they call it 100 times though, I would expect a more elegant approach to be to call it as a function and act on the response (it returns true if it was successful).
You should be able to go back to Workbench at the end if you do a corresponding OpenWorkBench_() at the end of the program, before you quit. |
15 September 2019, 16:45 | #3 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
For now I've commented it out, and returning to WB works fine. But this is on a WinUae profile with lots of ram. Will take a look at the chipram with and without. Thanks Daedalus!
|
18 September 2019, 20:43 | #4 | |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
Quote:
I found this big list at the autodocs. I'm curious what the most used / useful system calls are? PS: I plan to check out how much chipram closeWorkbench() frees, and if the return value can be used reliably to open it again or not. And I will be counting how many of these 100 calls it needs to close! Lol |
|
19 September 2019, 09:48 | #5 | |||
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Quote:
Quote:
Quote:
|
|||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|