Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
cprint and cfprint text mode routines
#5
(09-23-2023, 06:20 PM)James D Jarvis Wrote: It's not the speediest. May be able to improve it but I'd say it's still useable.  

results from my machine on a simple test.
[Image: image.png]

that works out to about 1,000 pages a second for the slowest method on my machine. 

Code: (Select All)
'don't forget to add the subroutines if you want to test it on your computer
t1 = Timer
For r = 1 To 100
    For b = 0 To 7
        For c = 0 To 31
            For y = 1 To 20
                For x = 1 To 26
                    Color c, b
                    Locate y, x
                    Print Chr$(x + 64)
                Next x
            Next y
        Next c
    Next b
Next r
t2 = Timer
Color 15, 0
t3 = Timer
For r = 1 To 100
    For b = 0 To 7
        For c = 0 To 31
            For y = 1 To 20
                For x = 1 To 26
                    cprint x, y, c, b, Chr$(x + 64)
                Next x
            Next y
        Next c
    Next b
Next r
t4 = Timer
t5 = Timer
For r = 1 To 100
    For b = 0 To 7
        For c = 0 To 31
            For y = 1 To 20
                For x = 1 To 26
                    cfprint x, y, c, Chr$(x + 64)
                Next x
            Next y
        Next c
    Next b
Next r
t6 = Timer

ah this code is missing the display of results. I think timer(.001) gives us best precision unless mistaken about timer arguments.

Still checking out code....
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Messages In This Thread
RE: cprint and cfprint text mode routines - by bplus - 09-23-2023, 06:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Text-centring subs PhilOfPerth 3 811 12-20-2024, 02:50 AM
Last Post: Pete
  A scrolling SUB for text in SCREEN 0 TempodiBasic 1 666 12-10-2024, 01:04 AM
Last Post: TempodiBasic
  Reverse search and case-insernsitive search routines TDarcos 6 1,368 04-15-2024, 04:21 AM
Last Post: eoredson
  Text encryption AtomicSlaughter 8 1,700 11-17-2022, 10:58 PM
Last Post: Jack
  Text Mode Drawing Routines James D Jarvis 0 580 10-16-2022, 06:27 PM
Last Post: James D Jarvis

Forum Jump:


Users browsing this thread: 1 Guest(s)