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....
b = b + ...
Reply


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



Users browsing this thread: 1 Guest(s)