The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
equivalent of waitvbl (from Amos and sdlBasic) needed
#1
i tried this code

Code:
#include <print64.bas> 10 ink 7:paper 0:border 2: bright 1:flash 0:cls 20 let x=10:let y=10 30 printat64(y,x):print64("X") 100 let a$=inkey$ 200 if a$="w" or a$="W" or a$="7" or a$=chr$(11) then printat64(y,x):print64(" "):y=y-1:printat64(y,x):print64("X"):end if 210 if a$="s" or a$="S" or a$="6" or a$=chr$(10) then printat64(y,x):print64(" "):y=y+1:printat64(y,x):print64("X"):end if 220 if a$="a" or a$="A" or a$="5" or a$=chr$(8) then printat64(y,x):print64(" "):x=x-1:printat64(y,x):print64("X"):end if 230 if a$="d" or a$="D" or a$="8" or a$=chr$(9) then printat64(y,x):print64(" "):x=x+1:printat64(y,x):print64("X"):end if 1000 goto 100

but it runs too fast, and i only need to synchronize it with the display frequence (50hz or 60hz)
i think zxspectrum uses this with some z80 interrupt instruction? which one, and how can we use it inside 'asm/endasm'?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)