!ABC processor usage
John Sandgrounder (1650) 574 posts |
Why is !ABC consuming so much processor time when idle (up to 30% of a Pi 2.2)? What is it doing? |
Jeffrey Lee (213) 6046 posts |
It’s probably calling Wimp_Poll without masking out the null poll event. |
Will Ling (519) 98 posts |
According to what? !ABC doesn’t appear to mask null polls, so if it’s the only thing you have running that’s listening to null polls, it will consume a lot of them. It’s not that it’s using all that processor time as such, just that nothing else is using it so there is a lot left over to keep polling !ABC. If I’ve not explained that well, it may be easier to see, if you open another !ABC, it should half the amount of poll time each gets, so each will be ~15% rather than totalling 60% of CPU time use. |
Colin Ferris (399) 1753 posts |
The front end – seems a separate prog - |
David Pitt (3386) 1248 posts |
Like this, from 000090C8 : E3A00000 : ..†„ : MOV R0,#0 000090CC : EF0400C7 : «..Ô : SWI Wimp_Poll Making the mask #1, with StrongED, calms it down nicely. |
Colin Ferris (399) 1753 posts |
Looks like the ‘Compiler’ takes these Memphis.$.BasicProg [edit 1] |
John Sandgrounder (1650) 574 posts |
OK, Thanks. If anybody plans to ‘fix’ it, would Wimp_PollIdle be the way to do it? |
Jeffrey Lee (213) 6046 posts |
Wimp_PollIdle is used to suppress null poll events until the indicated time. If you don’t need to receive null events, Wimp_Poll with the null event masked out is best. (And if you sometimes need null events and sometimes don’t, you can switch between different approaches as required) |
John Sandgrounder (1650) 574 posts |
I do not know if !ABC needs null poll events, so I assumed it does. |
Colin Ferris (399) 1753 posts |
For use in ABC Compiler – Using Print Integer or Print String Line Number Note is there any Docs – on using [Edit 1] |
Martin Avison (27) 1437 posts |
Colin: I am not sure what you are asking in your above post. Reporter or !ABC? |
Colin Ferris (399) 1753 posts |
Debugging output from a ABC !RunImage. Seems to work quite well :-) Several progs use the DDE FrontEnd Some info on how it works would be Still trying to narrow down WebsterXL On key poll PROC key – am turning on If you have any ideas on how to find Thanks |
Sprow (202) 1125 posts |
Chapter 22 of the ‘Desktop Tools’ manual supplied with the DDE (you mention !ObjAsm, so you’ll have at least PDFs, maybe the dead tree versions too). If in doubt, read the manual. |
Colin Ferris (399) 1753 posts |
It seems I don’t have ‘Desktop Tools’ – just loaded !Librarian. Are those Desktop Tools/Acorn Assembler/Acorn C/C++ new? Another question with ref to !Zap – can a search/replace be done on ‘:’ replacing it with a carriage Return/new line? Thanks |
Rick Murray (539) 13429 posts |
[…]
You have the DDE, don’t you? Within AcornC/C++ is a subdirectory called Tools and they’re all in there. They’re basically just pretty front ends to the command line utilities (AcornC/C++.!SetPaths.Lib32).
Yup. Shift-F4. By default options are “From start”, “Global replace”, “‘\’ commands” and “Macros” selected, everything else unselected. |
Colin Ferris (399) 1753 posts |
Ahh – saving the BASIC file as text (using StrongED – Zap seemed to just File type the Basic file as &FFF) Now loaded backin to Zap – and the search/replace now works – with a text file :-) |
Rick Murray (539) 13429 posts |
Ah, you meant in BASIC…
Yes, I’ve run into that. It’s because StrongEd and Edit work with the program as plain text and detokenise/tokenise around the edit session. If you want to load/edit detokenised BASIC in Zap… Iconbar → Menu → Options → Mode → BASTXT Then drag a BASIC file to Zap’s icon while holding down the Ctrl key. You must edit/save in BASTXT mode, and more specifically, save in BASTXT mode. You can’t switch to colourised BASIC. But you can edit, save, then reload it as normal BASIC. |