Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE SUB DrawString (X%, Y%, C%, S$)
- DEFINT A-Z
- REM $INCLUDE: 'qbx.bi'
- SCREEN 13
- DIM lCalls AS LONG, lChars AS LONG
- sText$ = "?"
- fCalls! = TIMER
- DO
- iX = RND * 312: iY = RND * 191: iC = RND * 255
- DrawString iX, iY, iC, sText$
- DrawString iX, iY, iC, sText$
- DrawString iX, iY, iC, sText$
- lCalls = lCalls + 3
- LOOP UNTIL ABS(TIMER - fCalls!) >= 3
- sText$ = CHR$(1) + " Hello World " + CHR$(1)
- fChars! = TIMER
- DO
- iX = RND * 312: iY = RND * 188: iC = RND * 255
- DrawString iX, iY, iC, sText$
- DrawString iX, iY, iC, sText$
- DrawString iX, iY, iC, sText$
- lChars = lChars + 3
- LOOP UNTIL ABS(TIMER - fChars!) >= 3
- LOCATE 1, 1
- PRINT "Calls/s = "; lCalls \ 3
- PRINT "Chars/s = "; (lChars * LEN(sText$)) \ 3
- SLEEP
- SUB DrawString (X%, Y%, C%, S$) STATIC
- IF iInit = 0 THEN
- iInit = 1
- REDIM ASM(36) AS LONG
- ASM(0)=&H1E0660CC
- ASM(1)=&HB71130B8
- ASM(2)=&H8C10CD03
- ASM(3)=&H89C08EC0
- ASM(4)=&H8BE589EE
- ASM(5)=&HC2692256
- ASM(6)=&H46030140
- ASM(7)=&HB8C78920
- ASM(8)=&HD88EA000
- ASM(9)=&H8B185E8B
- ASM(10)=&H668E1A4E
- ASM(11)=&H1E6E8B1C
- ASM(12)=&H8A6400B4
- ASM(13)=&HE0C10046
- ASM(14)=&HC6015603
- ASM(15)=&H8A2608B7
- ASM(16)=&H7401A804
- ASM(17)=&H75D8803
- ASM(18)=&H37402A8
- ASM(19)=&HA8065D88
- ASM(20)=&H88037404
- ASM(21)=&H8A8055D
- ASM(22)=&H5D880374
- ASM(23)=&H7410A804
- ASM(24)=&H35D8803
- ASM(25)=&H37420A8
- ASM(26)=&HA8025D88
- ASM(27)=&H88037440
- ASM(28)=&H80A8015D
- ASM(29)=&H1D880274
- ASM(30)=&H40C78146
- ASM(31)=&H75CFFE01
- ASM(32)=&HEF815EBD
- ASM(33)=&HC7830A00
- ASM(34)=&H75494508
- ASM(35)=&H61071FA3
- ASM(36)=&HCB
- END IF
- DEF SEG = VARSEG(ASM(0))
- CALL ABSOLUTE(BYVAL Y%, BYVAL X%, BYVAL SADD(S$), BYVAL SSEG(S$), BYVAL LEN(S$), BYVAL C%, VARPTR(ASM(0)))
- END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement