Jump to content
IGNORED

Cosmic Hero revision 2 ... final release ... RXB


Retrospect

Recommended Posts

@RXB I have a question that I think you probably know the answer to.

 

In standard XB, is CALL HCHAR as stupid as I think it is?  Does it do this ....
CALL HCHAR(1,1,42,768) .... okay we're putting 768 asterisks onto the screen with this ....

My question is: in the GPL code for CALL HCHAR is it literally incrementing a number each update for that 4th parenthesis?  (the 768) does it actually go from 1 to 768 counting internally?

And my next question is, "is that why CALL HPUT() is faster? because it's NOT doing that"..... or are they both doing the same thing just one's in GPL and one's in Assembly?  I know you did once state that some of the functions written in GPL for XB were written quite horribly.  

Link to comment
Share on other sites

4 hours ago, Retrospect said:

@RXB I have a question that I think you probably know the answer to.

 

In standard XB, is CALL HCHAR as stupid as I think it is?  Does it do this ....
CALL HCHAR(1,1,42,768) .... okay we're putting 768 asterisks onto the screen with this ....

My question is: in the GPL code for CALL HCHAR is it literally incrementing a number each update for that 4th parenthesis?  (the 768) does it actually go from 1 to 768 counting internally?

And my next question is, "is that why CALL HPUT() is faster? because it's NOT doing that"..... or are they both doing the same thing just one's in GPL and one's in Assembly?  I know you did once state that some of the functions written in GPL for XB were written quite horribly.  

>837D in the Scratch Pad if you use Classic99 Debugger

>837E and >847F are the ROW and COLUMN on screen for CB the character buffer >837D

So do a HCHAR(1,1,42,768) in Classic99 Debugger showing >8300 in the window and press enter.

Yes GPL does the counting, in RXB 2023 it is done in an assembly program instead of using GPL and that is why is so much faster then normal XB.

Now RXB CALL HPUT(row,column,string or number) is faster as it does not need a count like HCHAR or VCHAR does.

The speed increase is the string has the value length already loaded so no number is needed to be passed to the subroutine to count.

Passing a value from XB to the GPL or Assembly routine takes time to fetch/store/use.

But HPUT only passes string address and length is first byte of string that is all that was passed so the length was not needed to be passed.

Oddly it takes time to pass values to the interpreter, and the last time going back and forth speeds up the process.

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...