Advertisement
Guest User

Untitled

a guest
Jun 30th, 2019
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QBasic 0.58 KB | None | 0 0
  1. DECLARE SUB putpixel (x%, y%, c%)
  2. SCREEN 13
  3.  
  4. 'Just to circumvent any library init time
  5. PSET (1, 1), 0
  6.  
  7. t! = TIMER
  8.  
  9. FOR i = 0 TO 100000
  10.     PSET (5, 5), 15
  11. NEXT i
  12.  
  13. benchmarkpset! = TIMER - t!
  14.  
  15. t! = TIMER
  16.  
  17. FOR i = 0 TO 100000
  18.     DEF SEG = &HA000
  19.     POKE (5 + (5 * 320&)), 14
  20. NEXT i
  21.  
  22. benchmarkputpixel! = TIMER - t!
  23.  
  24. SCREEN 0
  25. WIDTH 80, 25
  26.  
  27. PRINT "PSet:     "; benchmarkpset!
  28. PRINT "PutPixel: "; benchmarkputpixel!
  29. PRINT
  30. PRINT "Press the Any key ;)"
  31.  
  32. t$ = INPUT$(1)
  33.  
  34. SUB putpixel (x%, y%, c%)
  35.     DEF SEG = &HA000
  36.     POKE (x% + (y% * 320&)), c%
  37. END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement