Jump to content
IGNORED

Would love to see this for TI programming


Airshack

Recommended Posts

I'd love to... I have quite a bit of stuff out there already... but it would be pretty cool to create a uniform format.

 

My computer is down right now... bad HD.

 

If nobody takes on the task by the time I have access to a computer again, I will start the process.

 

Will need help from some experienced GPL and Assembly programmers. I can demo some stuff in assembly, but I am not an advanced programmer.

Edited by Opry99er
  • Like 1
Link to comment
Share on other sites

I'd love to... I have quite a bit of stuff out there already... but it would be pretty cool to create a uniform format.

 

My computer is down right now... bad HD.

 

If nobody takes on the task by the time I have access to a computer again, I will start the process.

 

Will need help from some experienced GPL and Assembly programmers. I can demo some stuff in assembly, but I am not an advanced programmer.

There's a dude on here named Rich who seems to have a firm grasp of the fundamentals of GPL.

 

 

Sent from my iPhone using Tapatalk

  • Like 1
Link to comment
Share on other sites

Thanks just wish I have more people interested in GPL, most seem to want only Assembly which is faster, but one hell of a lot more complicated to debug.

 

Want proof take a look at the XB ROMs....example:

*
* COMPCT  ROUTINE (GARBAGE COLLECTION)
GRBAGE EQU  $                    
LN73D8 MOV  R11,R7                     
LN73DA MOV  @FREPTR,R0 * Pointer free space under symbol table                 
LN73DE MOV  @STRSP,R5  * End string space (high address)                
LN73E2 MOV  R0,@STRSP  * New pointer end string space                
LN73E6 INC  R5         * WTF does this do?               
LN73E8 DEC  R5         * WTF does this do?            
LN73EA C    @STREND,R5 * End of string space?                
LN73EE JL   LN73F6     * No, shift if necessary?                 
LN73F0 MOV  R0,@STREND * New pointer start string space, low address                
LN73F4 B    *R7 
*  

WTF INC R5 then DEC R5? And no they do not jump into the DEC address at LN73E8 so this kind of stuff is baffling at best!

Link to comment
Share on other sites

Maybe they are jumping back to LN73E8 somewhere; in that case the INC-DEC makes sen

Actually there is a section, but hard to see what it is doing:

*
* COMPCT  ROUTINE (GARBAGE COLLECTION)
GRBAGE EQU  $                    
LN73D8 MOV  R11,R7                     
LN73DA MOV  @FREPTR,R0 * Pointer free space under symbol table                 
LN73DE MOV  @STRSP,R5  * End string space (high address)                
LN73E2 MOV  R0,@STRSP  * New pointer end string space                
LN73E6 INC  R5         * WTF does this do?               
LN73E8 DEC  R5         * WTF does this do?            
LN73EA C    @STREND,R5 * End of string space?                
LN73EE JL   LN73F6     * No, shift if necessary?                 
LN73F0 MOV  R0,@STREND * New pointer start string space, low address                
LN73F4 B    *R7 
*                       
LN73F6 MOV  R5,R2      * Get string space (high address)                
LN73F8 MOV  R5,R3      * Get string space (high address)
* WRITE ADDRESS, READ BYTE                      
LN73FA BL   @>1880                     
LN73FE MOVB R1,R6                      
LN7400 SRL  R6,8       * Swap bytes                
LN7402 S    R6,R5      *                 
LN7404 AI   R5,>FFFD   * Upper 24K address+R5                
LN7408 MOV  R5,R3                      
LN740A BL   @LN6C9E                     
LN740E MOV  R1,R1                      
LN7410 JEQ  LN73E8                      
LN7412 C    *R6+,*R6+                  
LN7414 MOV  R2,R3                      
LN7416 MOV  R0,R4 
* WRITE ADDRESS, READ BYTE                     
LN7418 BL   @>1880                     
LN741C BL   @LN6422                     
LN7420 DEC  R3                         
LN7422 DEC  R4                         
LN7424 DEC  R6                         
LN7426 JGT  LN7418                      
LN7428 ANDI R4,>3FFF                   
LN742C MOV  R4,R0                      
LN742E INC  R4                         
LN7430 MOV  R4,R3                      
LN7432 BL   @LN6C9E                     
LN7436 MOV  R3,R6                      
LN7438 AI   R6,>0003
* WRITE ADDRESS, WRITE 2 BYTES                  
LN743C BL   @>18AE                     
LN7440 JMP  LN73E8 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Here it is, the only one.
Link to comment
Share on other sites

Thanks just wish I have more people interested in GPL, most seem to want only Assembly which is faster, but one hell of a lot more complicated to debug.

 

I can easily debug machine code in an emulator. How do you debug GPL?

Edit: I ask out of interest, because when I developed my emulator I spent a hell of a time debugging GPL from machine code.

Link to comment
Share on other sites

 

I can easily debug machine code in an emulator. How do you debug GPL?

Edit: I ask out of interest, because when I developed my emulator I spent a hell of a time debugging GPL from machine code.

Honestly are you saying Machine Code and Assembly are more easy to read and debug then GPL?

 

I even wrote a article on this in Micropendium magazine:

 

ftp://kirklanduncorked.com/programming/GPL/Gilbertson/gplsup.txt

To simplify what each one does, the Extended BASIC program's 
version of each program explains what is going on. If you are not 
one who understands Extended BASIC either, now is your chance to 
start learning and at the same time see two other languages. 

===============================================================
EXTENDED BASIC PROGRAM BYTES USED 14 * NOTE USES GPL Routine.
100 CALL CLEAR

GPL PROGRAM BYTES USED 2     * NOTE SUPPORT NOT NEEDED AS 
    ALL 32                     OPERATING SYSTEM IS BUILT IN. 
        
ASSEMBLY PROGRAM BYTES USED 16  * NOTE I AVOIDED COUNTING THE 
    LI   R0,>2000                 ASSEMBLY SUPPORT ROUTINES IN 
    LI   R1,767                   ORDER TO MAKE THIS PROGRAM 
J1  BLWP @VSBW                    WORK. SPACE OF ARTICLE IS 
    DEC  R1                       LIMITED. 1k IS NEEDED FOR 
    JNE  J1                       SUPPORT ROUTINES. 
================================================================
EXTENDED BASIC PROGRAM BYTES USED 10
100 GOTO 100

GPL PROGRAM BYTES USED 2 OR 3
    BR   LABEL 
    BS   LABEL 
    B    LABEL
        
ASSEMBLY PROGRAM BYTES USED 2 OR 4
    JMP  @LABEL
    B    @LABEL
===============================================================
EXTENDED BASIC PROGRAM BYTES USED 41
100 CALL JOYST(1,X,Y1) :: CALL KEY(1,K,S)

GPL PROGRAM BYTES USED 4
        ST   >01,@>8374
        SCAN
        
ASSEMBLY PROGRAM BYTES USED 12
    LI   >0100
    MOVB R0,@8374
    BLWP @KSCAN
=============================================================
EXTENDED BASIC PROGRAM BYTES USED 17
100 GOSUB 1000
1000 RETURN 

GPL PROGRAM BYTES USED 4
    CALL SUB
SUB RETURN

ASSEMBLY PROGRAM BYTES USED 6
    BL   @SUB
    SUB RT
=============================================================
EXTENDED BASIC PROGRAM BYTES USED 30
100 CALL HCHAR(12,16,42)

GPL PROGRAM BYTES USED 6
    ST   42,V@368
        
ASSEMBLY PROGRAM BYTES USED 12
    LI   R0,368
    LI   R1,>2A00
    BLWP @VSBW
============================================================
EXTENDED BASIC PROGRAM BYTES USED 58
100 CALL GCHAR(10,10,G) :: CALL HCHAR(20,20,G,4)

GPL PROGRAM BYTES USED 18
     ST   V@298,@FAC
     DST  >1714,@837E
LOOP ST   @FAC,@837D
     DEC  @837E
     CEQ  >13,@>837E
     BR   LOOP
         
ASSEMBLY PROGRAM BYTES USED 30
         LI       R0,298
         CLR  R1
         BLWP @VSBR
         LI   R2,3
         LI   R0,628
    LP   BLWP @VSBW
         AI   R0,32
         DEC  R2
         JNE  LP
===========================================================
EXTENDED BASIC PROGRAM BYTES USED 45 
100 CALL SUBROUTINE
1000 SUB SUBROUTINE
1010 SUBEND

GPL PROGRAM BYTES USED 4
    CALL SUB
SUB RTN

ASSEMBLY PROGRAM BYTES USED 42
SUBWS  BSS  32
SUB    DATA SUBWS
       DATA SUB2
SUB2   RTWP
       BLWP @SUB
===========================================================
EXTENDED BASIC PROGRAM BYTES USED 21
100 CALL MAGNIFY(3)

GPL PROGRAM BYTES USED 3
    ST   >E2,#1
        
ASSEMBLY PROGRAM BYTES USED 8
    LI   R0,>01E2
         BLWP @VWTR
==========================================================
EXTENDED BASIC PROGRAM BYTES USED 10
100 RANDOMIZE(

GPL PROGRAM BYTES USED 2
    RAND >08
        
ASSEMBLY PROGRAM BYTES USED 8
    LI   R0,>0800
    MOVE R0,@>83C0
=========================================================
EXTENDED BASIC PROGRAM BYTES USED 20
100 CALL SCREEN(5)

GPL PROGRAM BYTES USED 3
    ST   4,#7
        
ASSEMBLY PROGRAM BYTES USED 8
    LI   R0,>0704
         BLWP @VWTR
=========================================================
EXTENDED BASIC PROGRAM BYTES USED 30
100 IF VAR=8 THEN 200 ELSE 300

GPL PROGRAM BYTES USED 7
L100   CEQ   8,@VAR
       BS    L200
       BR    L300
           
ASSEMBLY PROGRAM BYTES USED 8
L100   CI    8,@VAR
       JEQ   L200
       JMP   L300
========================================================
GK EXTENDED BASIC PROGRAM BYTES USED 12
100 CALL BYE

GPL PROGRAM BYTES USED 1
    EXIT
        
ASSEMBLY PROGRAM BYTES USED 8
    LWPI  >83E0
    BLWP  @>0000
========================================================

You can see if you just look at the number of bytes used by each
language that all of them suffer in some area. At times Extended 
BASIC approaches Assembly in memory usage, while at times 
Assembly approaches GPL in memory usage. It is apparent that GPL 
can't be beat even in the simplest of the routines that Assembly 
should excel in. Texas Instruments did a great job with creating 
GPL. It either matches Assembly in size or beats it ever time. By 
the way, GPL also uses less memory than any other language I've 
compared it to, including Forth and C.
Edited by RXB
Link to comment
Share on other sites

Honestly are you saying Machine Code and Assembly are more easy to read and debug then GPL?

 

Obviously a GPL programmer would say no, and an Assembly programmer would say yes !? ;)

 

I even wrote a article on this in Micropendium magazine:

 

Unfortunately I'm not seeing one tiny hint of how to debug GPL in the material you referenced. :|

Link to comment
Share on other sites

Actually there is a section, but hard to see what it is doing:

...

You can write crappy code in any language. Some of the worst code I have ever seen is written in C++, JavaScript, Python, Java, etc. Don't blame the language for bad programming.

 

Honestly are you saying Machine Code and Assembly are more easy to read and debug then GPL?

...

 

It depends on what you are used to, and everyone has an environment in which they are most comfortable or enjoy. Certainly assembly can be tedious due to the small steps to get something seemingly simple done. But assembly has the speed advantage and nothing is abstracted or getting in your way, which is perfect for things like operating systems, language interpreters, games, etc.

 

Since I don't know GPL, to me it is hard to read and it seems like it would be tedious to learn all the parameters to the instructions. So yes, in my case, to me assembly is easier to read and debug than GPL.

 

As for "machine code", no it is not easier to read or debug. Rarely do you write in machine code, unless you are writing some small routines using MiniMemory, and it is not pleasant IMO. Writing machine code and assembly are not the same thing, and should not be used in the same sentence as you did above.

  • Like 3
Link to comment
Share on other sites

There is a somewhat similar problem debugging high-level Forth words in fbForth, TurboForth, TI Forth, CAMEL99 Forth, .... In an ALC debugger, one must track the pointers to the parameter and return stacks, current word and next word in the Forth workspace registers in addition to the normal ALC debugging. It is simply an additional debugging level, which is complicated by not having it as part of the debugger’s function, i.e., you have to do it manually, which takes longer and is more tedious than it would be in a debugger tailored to the language.

 

...lee

  • Like 2
Link to comment
Share on other sites

Unfortunately I'm not seeing one tiny hint of how to debug GPL in the material you referenced. :|

 

 

I have unlike you made a bunch of GPLHOW2 videos....getting tired of you treating me like crap. (Maybe you think you are funny?)

 

And I DID provide examples in XB, GPL and Assembly so people can see the difference:

===============================================================
EXTENDED BASIC PROGRAM BYTES USED 14 * NOTE USES GPL Routine.
100 CALL CLEAR

GPL PROGRAM BYTES USED 2     * NOTE SUPPORT NOT NEEDED AS 
    ALL 32                     OPERATING SYSTEM IS BUILT IN. 
        
ASSEMBLY PROGRAM BYTES USED 16  * NOTE I AVOIDED COUNTING THE 
    LI   R0,>2000                 ASSEMBLY SUPPORT ROUTINES IN 
    LI   R1,767                   ORDER TO MAKE THIS PROGRAM 
J1  BLWP @VSBW                    WORK. SPACE OF ARTICLE IS 
    DEC  R1                       LIMITED. 1k IS NEEDED FOR 
    JNE  J1                       SUPPORT ROUTINES. 
================================================================
EXTENDED BASIC PROGRAM BYTES USED 10
100 GOTO 100

GPL PROGRAM BYTES USED 2 OR 3
    BR   LABEL 
    BS   LABEL 
    B    LABEL
        
ASSEMBLY PROGRAM BYTES USED 2 OR 4
    JMP  @LABEL
    B    @LABEL
===============================================================
EXTENDED BASIC PROGRAM BYTES USED 41
100 CALL JOYST(1,X,Y1) :: CALL KEY(1,K,S)

GPL PROGRAM BYTES USED 4
        ST   >01,@>8374
        SCAN
        
ASSEMBLY PROGRAM BYTES USED 12
    LI   >0100
    MOVB R0,@8374
    BLWP @KSCAN
=============================================================
EXTENDED BASIC PROGRAM BYTES USED 17
100 GOSUB 1000
1000 RETURN 

GPL PROGRAM BYTES USED 4
    CALL SUB
SUB RETURN

ASSEMBLY PROGRAM BYTES USED 6
    BL   @SUB
    SUB RT
=============================================================
EXTENDED BASIC PROGRAM BYTES USED 30
100 CALL HCHAR(12,16,42)

GPL PROGRAM BYTES USED 6
    ST   42,V@368
        
ASSEMBLY PROGRAM BYTES USED 12
    LI   R0,368
    LI   R1,>2A00
    BLWP @VSBW
============================================================
EXTENDED BASIC PROGRAM BYTES USED 58
100 CALL GCHAR(10,10,G) :: CALL HCHAR(20,20,G,4)

GPL PROGRAM BYTES USED 18
     ST   V@298,@FAC
     DST  >1714,@837E
LOOP ST   @FAC,@837D
     DEC  @837E
     CEQ  >13,@>837E
     BR   LOOP
         
ASSEMBLY PROGRAM BYTES USED 30
         LI       R0,298
         CLR  R1
         BLWP @VSBR
         LI   R2,3
         LI   R0,628
    LP   BLWP @VSBW
         AI   R0,32
         DEC  R2
         JNE  LP
===========================================================
EXTENDED BASIC PROGRAM BYTES USED 45 
100 CALL SUBROUTINE
1000 SUB SUBROUTINE
1010 SUBEND

GPL PROGRAM BYTES USED 4
    CALL SUB
SUB RTN

ASSEMBLY PROGRAM BYTES USED 42
SUBWS  BSS  32
SUB    DATA SUBWS
       DATA SUB2
SUB2   RTWP
       BLWP @SUB
===========================================================
EXTENDED BASIC PROGRAM BYTES USED 21
100 CALL MAGNIFY(3)

GPL PROGRAM BYTES USED 3
    ST   >E2,#1
        
ASSEMBLY PROGRAM BYTES USED 8
    LI   R0,>01E2
         BLWP @VWTR
==========================================================
EXTENDED BASIC PROGRAM BYTES USED 10
100 RANDOMIZE(

GPL PROGRAM BYTES USED 2
    RAND >08
        
ASSEMBLY PROGRAM BYTES USED 8
    LI   R0,>0800
    MOVE R0,@>83C0
=========================================================
EXTENDED BASIC PROGRAM BYTES USED 20
100 CALL SCREEN(5)

GPL PROGRAM BYTES USED 3
    ST   4,#7
        
ASSEMBLY PROGRAM BYTES USED 8
    LI   R0,>0704
         BLWP @VWTR
=========================================================
EXTENDED BASIC PROGRAM BYTES USED 30
100 IF VAR=8 THEN 200 ELSE 300

GPL PROGRAM BYTES USED 7
L100   CEQ   8,@VAR
       BS    L200
       BR    L300
           
ASSEMBLY PROGRAM BYTES USED 8
L100   CI    8,@VAR
       JEQ   L200
       JMP   L300
========================================================
GK EXTENDED BASIC PROGRAM BYTES USED 12
100 CALL BYE

GPL PROGRAM BYTES USED 1
    EXIT
        
ASSEMBLY PROGRAM BYTES USED 8
    LWPI  >83E0
    BLWP  @>0000
========================================================
Link to comment
Share on other sites

To the original topic. How do you make assembly language programming videos that are engaging? Programming is typically an independent activity, and programming classic computers usually requires a lot of reference information to look up memory locations, instruction parameters, etc. I don't see how you get around reading... I was hoping to get a feel for how those c64 videos are doing it, but they seem to be pay-to-view.

 

I also have a fundamental disagreement with the first statement you see on that site:

 

"Life is too short to read twenty-year-old books."

 

More than half of the books I own are more then 20 years old and they contain some of the best information you can get for computers that are over 30 years old. That's like saying life is too short to mess with classic computers.

  • Like 1
Link to comment
Share on other sites

Back to my original question, if assembly is "one hell of a lot more complicated to debug" than GPL, how do you debug GPL?

As I have explained in the article I wrote for Micropendium years ago looking at a gradient of ease of learning.

 

TI BASIC

Extended BASIC

GPL

ASSEMBLY LANGUAGE

MACHINE CODE

 

GPL sits between Assembly and XB for a reason, it does not require WORD instructions to learn and bit manipulations of BYTE swaps to be required to learn.

As a byte orientated language GPL unlike Assembly does not expect you to start using SRA or SRL from the very start.

Having myself run a Assembly Language Class for the PUNN and Vancouver User groups I know Assembly it much tougher to learn.

 

I mean just to clear the screen in Assembly is hard to explain as you need 1K of support routines before you can even begin to do this.

 

I mean in Assembly you need to do this to clear screen:

ASSEMBLY PROGRAM BYTES USED 16  * NOTE I AVOIDED COUNTING THE 
    LI   R0,>2000                 ASSEMBLY SUPPORT ROUTINES IN 
    LI   R1,767                   ORDER TO MAKE THIS PROGRAM 
J1  BLWP @VSBW                    WORK. SPACE OF ARTICLE IS 
    DEC  R1                       LIMITED. 1k IS NEEDED FOR 
    JNE  J1                       SUPPORT ROUTINES. 

How the hell is this as easy as TI BASIC or XB:

CALL CLEAR

 

Or GPL

ALL 32

 

Really are you going to tell me this is easier in Assembly for a beginner? REALLY?

Edited by RXB
Link to comment
Share on other sites

As I have explained in the article I wrote for Micropendium years ago looking at a gradient of ease of learning.

...

Really are you going to tell me this is easier in Assembly for a beginner? REALLY?

 

Rich, bludgeoning us with stories of how much easier GPL is to learn than Assembly Language is really not offering us any insight into debugging GPL.

 

...lee

  • Like 2
Link to comment
Share on other sites

I can easily debug machine code in an emulator. How do you debug GPL?

Honestly are you saying Machine Code and Assembly are more easy to read and debug then GPL?

I have unlike you made a bunch of GPLHOW2 videos....getting tired of you treating me like crap. (Maybe you think you are funny?)

I'm sorry you feel that way. And I'm not trying to be funny.

 

Yes, I honestly feel that Assembly (/machine code) is much easier to "debug" than GPL. And I think it's very well explained by Lee Stewart in post #17.

 

And I DID provide examples in XB, GPL and Assembly so people can see the difference:

Yes, clearing the screen seems more complicated in Assembly than GPL. When "writing" longer and more complicated programs (than clearing the screen), - if the result (running the program) is not as expected, one starts to "debug". I hope we can agree on that.

 

I was interested in how one can possibly more easily "debug" GPL.

 

Edited by sometimes99er
  • Like 1
Link to comment
Share on other sites

As a novice 9900 coder, I can tell you that Rich is correct. Higher level languages are easier to learn than low level/machine level languages like Sam.

 

But I don't see how the ease of learning a language has anything to do with debugging source code. To be honest, I find debugging in assembly to be extremely straightforward, especially if errors occur on assembly. :D

 

Well structured, fully commented assembly code is sometimes easier to understand than even a BASIC listing.

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...