{{htmlmetatags>metatag-robots=() metatag-title=(MANIPOLAZIONE DI SCHERMI CON L'USO DI CLS (1) | ugBASIC User Manual) metatag-keywords=(ugBASIC,Commodore 64,Commodore PLUS/4,ZX Spectrum) metatag-description=(An isomorphic language for retrocomputers) metatag-media-og:image=(:ugbasic:logo-ugbasic-fb.png) metatag-og:title=(MANIPOLAZIONE DI SCHERMI CON L'USO DI CLS (1) | ugBASIC User Manual) metatag-og:description=(An isomorphic language for retrocomputers) }} ====== ugBASIC Manuale Utente ====== ===== MANIPOLAZIONE DI SCHERMI CON L'USO DI CLS (1) ===== ==== SCOPO ==== Questo esempio mostra come cancellare lo schermo usando il comando ''CLS''. Innanzitutto il programma richiederà uno schermo bitmap di 320x200 pixel di risoluzione a 16 colori, utilizzando il comando ''BITMAP ENABLE''. Successivamente, impostiamo il colore di sfondo su rosso utilizzando il comando ''PAPER'' e puliamo lo schermo con un colore rosso (''RED''). Quindi aspettiamo 2 secondi e riattiviamo la modalità ''TILEMAP''. Quindi cambiamo lo sfondo in giallo (''YELLOW'') e, dopo aver impostato la tessera vuota su quella con il numero 48 (lo "0"), ripuliamo lo schermo. ==== SORGENTE ==== IF CAN SCREEN #1 THEN SCREEN #1 PAPER RED CLS WAIT KEY ENDIF IF CAN SCREEN #2 THEN SCREEN #2 PAPER GREEN CLS WAIT KEY ENDIF IF CAN SCREEN #3 THEN SCREEN #3 PAPER BLUE CLS WAIT KEY ENDIF IF CAN SCREEN #4 THEN SCREEN #4 PAPER RED CLS WAIT KEY ENDIF IF CAN SCREEN #5 THEN SCREEN #5 PAPER GREEN CLS WAIT KEY ENDIF IF CAN SCREEN #6 THEN SCREEN #6 PAPER BLUE CLS WAIT KEY ENDIF IF CAN SCREEN #7 THEN SCREEN #7 PAPER RED CLS WAIT KEY ENDIF IF CAN SCREEN #8 THEN SCREEN #8 PAPER GREEN CLS WAIT KEY ENDIF IF CAN SCREEN #9 THEN SCREEN #9 PAPER BLUE CLS WAIT KEY ENDIF IF CAN SCREEN #10 THEN SCREEN #10 PAPER RED CLS WAIT KEY ENDIF IF CAN SCREEN #11 THEN SCREEN #11 PAPER GREEN CLS WAIT KEY ENDIF IF CAN SCREEN #12 THEN SCREEN #12 PAPER BLUE CLS WAIT KEY ENDIF IF CAN SCREEN #13 THEN SCREEN #13 PAPER RED CLS WAIT KEY ENDIF IF CAN SCREEN #14 THEN SCREEN #14 PAPER GREEN CLS WAIT KEY ENDIF IF CAN SCREEN #15 THEN SCREEN #15 PAPER BLUE CLS WAIT KEY ENDIF HALT ==== FILE ==== * ''[[https://github.com/spotlessmind1975/ugbasic/tree/main/examples/screens_cls_03.bas|screens_cls_03.bas]]'' ==== COME ESEGUIRLO ==== === Atari 400/800 === Per poter eseguire l'esempio, è necessario disporre dell'emulatore Altirra, e in particolare che l'eseguibile ''x64sc'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.atari screens_cls_03.bas -o example.xex altirra example.xex # Windows ugbc.atari.exe screens_cls_03.bas -o example.xex altirra example.xex === Atari 600XL/800XL/1200XL/XG(SE) === Per poter eseguire l'esempio, è necessario disporre dell'emulatore Altirra, e in particolare che l'eseguibile ''x64sc'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.atarixl screens_cls_03.bas -o example.xex altirra example.xex # Windows ugbc.atarixl.exe screens_cls_03.bas -o example.xex altirra example.xex === Commodore 64 === Per poter eseguire l'esempio, è necessario disporre dell'emulatore VICE, e in particolare che l'eseguibile ''x64sc'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.c64 screens_cls_03.bas -o example.prg x64sc example.prg # Windows ugbc.c64.exe screens_cls_03.bas -o example.prg x64sc example.prg === Commodore PLUS/4 === == Usando YAPE == Per poter eseguire l'esempio, è necessario disporre dell'emulatore YAPE, e in particolare che l'eseguibile ''yape'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.plus4 screens_cls_03.bas -o example.prg yape example.prg # Windows ugbc.plus4.exe screens_cls_03.bas -o example.prg yape example.prg == Usando VICE == Per poter eseguire l'esempio, è necessario disporre dell'emulatore VICE, e in particolare che l'eseguibile ''xplus4'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.plus4 screens_cls_03.bas -o example.prg xplus4 example.prg # Windows ugbc.plus4.exe screens_cls_03.bas -o example.prg xplus4 example.prg === Dragon 32 === Per poter eseguire l'esempio, è necessario disporre dell'emulatore XROAR, e in particolare che l'eseguibile ''x64sc'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.d32 screens_cls_03.bas -o example.bin xroar -rompath (percorso ROM) example.bin # Windows ugbc.d32.exe screens_cls_03.bas -o example.bin xroar.exe -rompath (percorso ROM) example.bin === Dragon 64 === Per poter eseguire l'esempio, è necessario disporre dell'emulatore XROAR, e in particolare che l'eseguibile ''x64sc'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.d64 screens_cls_03.bas -o example.bin xroar -rompath (percorso ROM) example.bin # Windows ugbc.d64.exe screens_cls_03.bas -o example.bin xroar.exe -rompath (percorso ROM) example.bin === PC128 Olivetti Prodest === Per poter eseguire l'esempio, è necessario disporre dell'emulatore DCMOTO, e in particolare che l'eseguibile ''x64sc'' sia accessibile. Digitare quindi i seguenti comandi: # Linux ugbc.pc128op screens_cls_03.bas -o example.bin dcmoto example.bin (scegliere example.bin) (scegliere BASIC 128) CLEAR,&H2FFF: LOADM"CASS:",R: EXEC # Windows ugbc.pc128op.exe screens_cls_03.bas -o example.bin dcmoto example.bin (scegliere BASIC 128) CLEAR,&H2FFF: LOADM"CASS:",R: EXEC === Thomson MO5 === Per poter eseguire l'esempio, è necessario disporre dell'emulatore DCMOTO, e in particolare che l'eseguibile ''x64sc'' sia accessibile. Digitare quindi i seguenti comandi: # Linux ugbc.mo5 screens_cls_03.bas -o example.bin dcmoto example.bin (scegliere example.bin) (scegliere BASIC 128) CLEAR,&H2FFF: LOADM"CASS:",R: EXEC # Windows ugbc.mo5.exe screens_cls_03.bas -o example.bin dcmoto example.bin (scegliere BASIC 128) CLEAR,&H2FFF: LOADM"CASS:",R: EXEC === Commodore VIC-20 === Per poter eseguire l'esempio, è necessario disporre dell'emulatore XEMU, e in particolare che l'eseguibile ''xmega65'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.vic20 screens_cls_03.bas -o example.prg xvic --memory 24k example.prg # Windows ugbc.vic20.exe screens_cls_03.bas -o example.prg xvic --memory 24k example.prg === ZX Spectrum === Per poter eseguire l'esempio, è necessario disporre dell'emulatore Speccy, e in particolare che l'eseguibile ''speccy'' sia accessibile. Digitare quindi il seguente comando: # Linux ugbc.zx screens_cls_03.bas -o example.tap Speccy example.tap # Windows ugbc.zx.exe screens_cls_03.bas -o example.tap Speccy example.tap === ColecoVision === Per compilare e mandare in esecuzione l'esempio, hai bisogno di avere l'emulatore openMsx oppure il BlueMSX, e in particolare che il suo eseguibile sia accessibile. Dopo di che, digita questo comando sulla linea di comando: == openMSX == # Linux ugbc.coleco screens_cls_03.bas -o example.rom openmsx -machine \"COL - ColecoVision\" -cart example.rom # Windows ugbc.coleco.exe screens_cls_03.bas -o example.rom bluemsx -machine \"COL - ColecoVision\" example.rom == blueMSX == # Linux ugbc.coleco screens_cls_03.bas -o example.rom bluemsx /machine \"COL - ColecoVision\" /rom1 example.rom # Windows ugbc.coleco.exe screens_cls_03.bas -o example.rom bluemsx /machine \"COL - ColecoVision\" /rom1 example.rom === SEGA SC-3000 === Per compilare e mandare in esecuzione l'esempio, hai bisogno di avere l'emulatore BlueMSX, e in particolare che il suo eseguibile sia accessibile. Dopo di che, digita questo comando sulla linea di comando: # Linux ugbc.sc3000 screens_cls_03.bas -o example.rom bluemsx /machine \"SEGA - SC-3000\" /rom1 example.rom # Windows ugbc.sc3000.exe screens_cls_03.bas -o example.rom bluemsx /machine \"SEGA - SC-3000\" /rom1 example.rom === SEGA SG-1000 === Per compilare e mandare in esecuzione l'esempio, hai bisogno di avere l'emulatore BlueMSX, e in particolare che il suo eseguibile sia accessibile. Dopo di che, digita questo comando sulla linea di comando: # Linux ugbc.sg1000 screens_cls_03.bas -o example.rom bluemsx /machine \"SEGA - SG-1000\" /rom1 example.rom # Windows ugbc.sg1000.exe screens_cls_03.bas -o example.rom bluemsx /machine \"SEGA - SG-1000\" /rom1 example.rom ==== PROBLEMI? ==== Se hai trovato un problema nel cercare di eseguire questo esempio, se pensi che ci sia un bug o, più semplicemente, vorresti che fosse migliorato, [[https://github.com/spotlessmind1975/ugbasic/issues/new?title=MIGLIORARE MANIPOLAZIONE DI SCHERMI CON L'USO DI CLS (1)|apri una segnalazione]] su GitHub per questo specifico esempio. Grazie!===== POWERED BY ===== [[:it:ugbasic:user:examples|{{ :ugbasic:user:logo-ugbasic.png?nolink&600 |}}]]