POV Code using Gosub

Some time ago I saw code posted in the forum using Gosub to spell PICAXE on a wand. I have searched every way I could imagine (wand, POV, Persistance, etc.) and no luck. I would appreciate it if anyone knows where it is and would share the information.
I have a working prototype but it is very cumbersome to change the message.
Andres
 

SD2100

New Member
Have a look at ON GOSUB too......

Code:
eeprom 0,("PICAXE")

symbol loop1 = b0
symbol char  = b1

for loop1 = 0 to 5
    read loop1,char
    select case char
        case 65 to 90
            Char = Char - 65
            on Char gosub A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
    end select		
next
Note: Some labels will have to be changed as these are reserved words.
 

hippy

Ex-Staff (retired)
ON-GOSUB can be a bit of a memory hog but you can usually translate an ON-GOSUB to a GOSUB and ON-GOTO ...

Code:
for loop1 = 0 to 5
    read loop1,char
    select case char
        case 65 to 90
            Char = Char - 65
            [b]Gosub ShowChar[/b]
    end select		
 next
End

ShowChar:
  on Char [b]goto[/b] A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z
 
Top