![]() |
|
CLS/Fade out ASM Sub-routine - Printable Version +- Boriel Basic Forum (https://forum.boriel.com) +-- Forum: Compilers and Computer Languages (https://forum.boriel.com/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://forum.boriel.com/forumdisplay.php?fid=11) +---- Forum: How-To & Tutorials (https://forum.boriel.com/forumdisplay.php?fid=13) +---- Thread: CLS/Fade out ASM Sub-routine (/showthread.php?tid=2641) |
CLS/Fade out ASM Sub-routine - tubz74 - 2025-10-05 This is a small clear screen, that sort of fades out the screen pixel by pixel to the background colour. I took it from one of the Melbourne house books, can't remember which one though. No idea if it breaks anything else, but I've not had any issues. Code: SUB CLSFadeOut()RE: CLS/Fade out ASM Sub-routine - boriel - 2025-10-05 Good one! No, it won't break anything (only IX should be preserved (push/pop) before the function returns). Also, it's recommended to make your labels private. To do so: Wrap your ASM routine between Code: PROCDeclare your labels locals after PROC, with: LOCAL NXTFADE, NXT :-) If your code is BSD / MIT / Apache I can put it in the standard library for other people to use it. RE: CLS/Fade out ASM Sub-routine - tubz74 - 2025-10-05 Happy for it to be used however by whoever - which ever licence doesn't require anything from me or from the user. |