File Manager for PicoMite


Author Message
dddns
Guru

Joined: 20/09/2024
Location: Germany
Posts: 463
Posted: 06:17pm 12 Apr 2025      

  dddns said  I think this is your solution. Just just use find/replace and there you go. Or do I overlook something?


I really cannot explain why you guys are ignoring this. It is a direct replacement for the print@ command with the same syntax. And it is even from Peter himself and very nice. Thanks again for this:
Option explicit
setcolour RGB(red),RGB(blue)
clearscreen
writeat 30,24,"Hello World"
'
Sub resize 'Set the serial console to the same size as the screen
Option console serial
Print Chr$(27)+"[8;"+Str$(MM.HEIGHT)+";"+Str$(MM.WIDTH+1)+"t";
Option console both
End Sub
'
Sub cursor x%,y% ' move the cursor to the x%,y% character positions (not pixel)
Option console serial
Print Chr$(27)+"["+Str$(y%+1)+";"+Str$(x%+1)+"H";
If MM.DISPLAY Then
Print @(x%*MM.FONTWIDTH,y%*MM.FONTHEIGHT)"";
EndIf
Option console both
End Sub
'
Sub writeat x%,y%,t$ 'write text at the character position specified
Option console serial
Print Chr$(27)+"["+Str$(y%+1)+";"+Str$(x%+1)+"H"+t$;
If MM.DISPLAY Then
Text x%*MM.FONTWIDTH,y%*MM.FONTHEIGHT,t$
EndIf
Option console both
End Sub
'
Sub write t$ 'write text at the current cursor position
Option console serial
Print t$;
If MM.DISPLAY Then
Text MM.HPOS*MM.FONTWIDTH,MM.VPOS*MM.FONTHEIGHT,t$
EndIf
Option console both
End Sub
'
Sub setcolour f%, b% ' set the colour of both the screen and the console
Local integer fr=f%>>16,br=b%>>16,fg=(f%>>8) And &HFF,bg=(b%>>8) And &HFF,fb=f%
And &HFF,bb=b% And &HFF
Option console serial
Print Chr$(27)+"[38;2;"+Str$(fr)+";"+Str$(fg)+";"+Str$(fb)+"m";
Print Chr$(27)+"[48;2;"+Str$(br)+";"+Str$(bg)+";"+Str$(bb)+"m";
Option console both
Colour f%,b%
End Sub
'
Sub clearscreen 'clear both the display and the console
Option console serial
Print Chr$(27)+"[7"+Chr$(27)+"[2J"+Chr$(27)+"[H";
If MM.DISPLAY Then
CLS
EndIf
Option console both
End Sub