+RXB Posted July 6, 2011 Share Posted July 6, 2011 (edited) Hi, I found this program in the Smart programmer. 1 CALL CLEAR :: PRINT:"Output to Device? (Y/N) N" :: ACCEPT AT(23,26)SIZE(-1)VALIDATE("YN"):A$ :: IF A$="Y" THEN OPEN #1:A$,OUTPUT :: P=1 2 CALL CLEAR :: CALL PEEK(-31952,A,B,C,D) :: A=A*256+B-65536 :: C=C*256+D-65536 :: PRINT #P:" PROGRAM INFORMATION": :"Line Number Table" 3 PRINT #P: :"Start Address ";A:"End Address ";C: : :"Line Bytes Start":"Number Used Address":"------ ----- -------" 4 FOR I=C-3 TO A STEP-4 :: CALL PEEK(I,B,D,E,F) :: B=B*256+D :: E=E*256+F-65536 :: CALL PEEK(E-1,D) :: D=D+5 :: T=T+D 5 PRINT #P,USING "##### ### ######":B,D,E :: IF E THEN CALL SCREEN(6) :: GOSUB 7 6 NEXT I :: A=(A-C-1)/-4 :: PRINT #P: : :TAB(;"Total Bytes =";T:" Number of lines =";A:"Average Bytes/Line =";INT(T/A) :: STOP 7 CALL KEY("",3,D,E) :: CALL SCREEN( :: RETURN 8 ! Note Variables: A$, P, A, B, C, D, E, F, and T are used in this program. So you merge this program into a XB program and run it. My problem is I want to write new commands in RXB and how XB executes each line is in Assembly not GPL. When my SCSI drive crashed I lost the Assembly source code of XB, and also the way to figure out how it executes from one line number to the next. How I look at programs stored in RAM is like this using RXB 2001: 10 GOTO 50 30 REM COMMENT 50 CALL CLEAR 90 GOTO 10 CALL MOVES("RR",4096,-4096,8192)::CALL BSAVE("DSK2.DUMP") Then use TI99DIR53b view to look at the file DUMP. I see the >C9(LineNumberToken) and line numbers but how would I find a line number out of the entire program? Anyone have any clue on how XB does this? (Specifically how GOTO jumps from one line to the next) Edited July 6, 2011 by RXB Quote Link to comment Share on other sites More sharing options...
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.