Jump to content
Sign in to follow this  
hloberg

XB lower case & a place for program sub-routines

Recommended Posts

I looked over the forum & does any one have a nice small sub-routine to create true lower case in XB I can insert into my program?

Also, we need a space where we can post little helpful subroutines like this that people have come up with and can be inserted into other programs. I guess this topic is a good place as any. that is, if someone hasn't already created such a topic. No reason to re-invent the wheel if someone else has already created it and fitted it with mags. 

 

Share this post


Link to post
Share on other sites
6 minutes ago, hloberg said:

I looked over the forum & does any one have a nice small sub-routine to create true lower case in XB I can insert into my program?

Also, we need a space where we can post little helpful subroutines like this that people have come up with and can be inserted into other programs. I guess this topic is a good place as any. that is, if someone hasn't already created such a topic. No reason to re-invent the wheel if someone else has already created it and fitted it with mags. 

 

Are you looking for an XB coded subroutine or an ALC routine that is LOADed and LINKed from XB?

 

...lee

  • Like 1

Share this post


Link to post
Share on other sites

just a little XB cut and paste in to the program. I see where you're going but in this case I just want to keep it simple even if it takes a little to load. 

If you got both, that be good too as someone else might want the ALC load. 

Share this post


Link to post
Share on other sites
1 hour ago, hloberg said:

I looked over the forum & does any one have a nice small sub-routine to create true lower case in XB I can insert into my program?

Also, we need a space where we can post little helpful subroutines like this that people have come up with and can be inserted into other programs. I guess this topic is a good place as any. that is, if someone hasn't already created such a topic. No reason to re-invent the wheel if someone else has already created it and fitted it with mags. 

 

If you like the lower case characters that are in the 99/8’s character set, it would be trivial to provide the character definitions.  Let me know if those work and I can get them from MAME and put it here.

  • Like 1

Share this post


Link to post
Share on other sites

Here is the font from ASCII 32 – 127 from my fbForth font file (FBFONT):

180 CALL CHAR (32,"00000000000000001010101010001000282828000000000028287C287C282800")
190 CALL CHAR (36,"385450381454380060640810204C0C0020505020544834000808100000000000")
200 CALL CHAR (40,"081020202010080020100808081020000028107C102800000010107C10100000")
210 CALL CHAR (44,"00000000301020000000007C0000000000000000003030000004081020400000")
220 CALL CHAR (48,"38444C546444380010301010101038003844040810207C003844041804443800")
230 CALL CHAR (52,"081828487C0808007C4078040444380018204078444438007C04081020202000")
240 CALL CHAR (56,"38444438444438003844443C0408300000303000303000000030300030102000")
250 CALL CHAR (60,"081020402010080000007C007C00000020100804081020003844040810001000")
260 CALL CHAR (64,"38445C545C4038003844447C4444440078242438242478003844404040443800")
270 CALL CHAR (68,"78242424242478007C40407840407C007C404078404040003C40405C44443800")
280 CALL CHAR (72,"4444447C44444400381010101010380004040404044438004448506050484400")
290 CALL CHAR (76,"4040404040407C00446C545444444400446464544C4C44007C44444444447C00")
300 CALL CHAR (80,"7844447840404000384444445448340078444478504844003844403804443800")
310 CALL CHAR (84,"7C10101010101000444444444444380044444428281010004444445454542800")
320 CALL CHAR (88,"444428102844440044442810101010007C04081020407C003820202020203800")
330 CALL CHAR (92,"0040201008040000380808080808380000102844000000000000000000007C00")
340 CALL CHAR (96,"0020100800000000000038043C443C00404078444444780000003C4040403C00")
350 CALL CHAR (100,"04043C4444443C00000038447C403800182420702020200000003C44443C0438")
360 CALL CHAR (104,"40405864444444001000301010107C0004000404040444384040444870484400")
370 CALL CHAR (108,"3010101010107C00000068545454540000005864444444000000384444443800")
380 CALL CHAR (112,"000078444478404000003C44443C0404000058644040400000003C4038047800")
390 CALL CHAR (116,"10107C101014080000004444444C340000004444442810000000444454542800")
400 CALL CHAR (120,"0000442810284400000044444C34043800007C0810207C001820204020201800")
410 CALL CHAR (124,"101010001010100030080804080830000020540800000000FFFFFFFFFFFFFFFF")
500 PRINT " !""#$%&'()*+,-./0123456789:;<=>[email protected][\]^_`abcdefghijklmnopqrstuvwxyz{|}~"&CHR$(127)
510 GOTO 510

The reason I posted the entire font is that the blank row of pixels in this font is on the bottom to allow for true descenders, which would really look strange with only the new lowercase characters.

 

...lee

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, hloberg said:

I looked over the forum & does any one have a nice small sub-routine to create true lower case in XB I can insert into my program?

Also, we need a space where we can post little helpful subroutines like this that people have come up with and can be inserted into other programs. I guess this topic is a good place as any. that is, if someone hasn't already created such a topic. No reason to re-invent the wheel if someone else has already created it and fitted it with mags. 

 

Hmm everything you can think of is in this Traveler 7Zip file.

 

TRAVELER.7z

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Lee Stewart said:

Here is the font from ASCII 32 – 127 from my fbForth font file (FBFONT):

180 CALL CHAR (32,"00000000000000001010101010001000282828000000000028287C287C282800")
190 CALL CHAR (36,"385450381454380060640810204C0C0020505020544834000808100000000000")
200 CALL CHAR (40,"081020202010080020100808081020000028107C102800000010107C10100000")
210 CALL CHAR (44,"00000000301020000000007C0000000000000000003030000004081020400000")
220 CALL CHAR (48,"38444C546444380010301010101038003844040810207C003844041804443800")
230 CALL CHAR (52,"081828487C0808007C4078040444380018204078444438007C04081020202000")
240 CALL CHAR (56,"38444438444438003844443C0408300000303000303000000030300030102000")
250 CALL CHAR (60,"081020402010080000007C007C00000020100804081020003844040810001000")
260 CALL CHAR (64,"38445C545C4038003844447C4444440078242438242478003844404040443800")
270 CALL CHAR (68,"78242424242478007C40407840407C007C404078404040003C40405C44443800")
280 CALL CHAR (72,"4444447C44444400381010101010380004040404044438004448506050484400")
290 CALL CHAR (76,"4040404040407C00446C545444444400446464544C4C44007C44444444447C00")
300 CALL CHAR (80,"7844447840404000384444445448340078444478504844003844403804443800")
310 CALL CHAR (84,"7C10101010101000444444444444380044444428281010004444445454542800")
320 CALL CHAR (88,"444428102844440044442810101010007C04081020407C003820202020203800")
330 CALL CHAR (92,"0040201008040000380808080808380000102844000000000000000000007C00")
340 CALL CHAR (96,"0020100800000000000038043C443C00404078444444780000003C4040403C00")
350 CALL CHAR (100,"04043C4444443C00000038447C403800182420702020200000003C44443C0438")
360 CALL CHAR (104,"40405864444444001000301010107C0004000404040444384040444870484400")
370 CALL CHAR (108,"3010101010107C00000068545454540000005864444444000000384444443800")
380 CALL CHAR (112,"000078444478404000003C44443C0404000058644040400000003C4038047800")
390 CALL CHAR (116,"10107C101014080000004444444C340000004444442810000000444454542800")
400 CALL CHAR (120,"0000442810284400000044444C34043800007C0810207C001820204020201800")
410 CALL CHAR (124,"101010001010100030080804080830000020540800000000FFFFFFFFFFFFFFFF")
500 PRINT " !""#$%&'()*+,-./0123456789:;<=>[email protected][\]^_`abcdefghijklmnopqrstuvwxyz{|}~"&CHR$(127)
510 GOTO 510

The reason I posted the entire font is that the blank row of pixels in this font is on the bottom to allow for true descenders, which would really look strange with only the new lowercase characters.

 

...lee

totally worked. thanks.

  • Like 2

Share this post


Link to post
Share on other sites
On 8/28/2019 at 3:42 PM, hloberg said:

I looked over the forum & does any one have a nice small sub-routine to create true lower case in XB I can insert into my program?

Also, we need a space where we can post little helpful subroutines like this that people have come up with and can be inserted into other programs. I guess this topic is a good place as any. that is, if someone hasn't already created such a topic. No reason to re-invent the wheel if someone else has already created it and fitted it with mags. 

 

OK...Here is a LOADable ALC version of the fbForth font from post #5:

 

Spoiler
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Program Name: FBFNTB                                                  *
*                                                                       *
*     Loads fbForth's FBFONT into TI Basic or TI Extended Basic         *
*     Invoked by CALL LINK("FBFNTB")                                    *
*                                                                       *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
       DEF  FBFNTB
       
VDPWA  EQU  >8C02          VDP Write Address
VDPRD  EQU  >8800          VDP Read Data
VDPWD  EQU  >8C00          VDP Write Data
R11SAV EQU  >8352          Return address storage

*
** Program entry point
*
FBFNTB MOV  R11,@R11SAV    save return
*
** Copy font to VRAM
*
       LI   R0,>0400       VRAM address of space char in TIB & XB PDT
       LI   R1,FONTAB      CPU buffer address of font table
       LI   R2,768         count of font bytes to transfer
       LI   R3,VMBW        set up to write FBFNTB
       BL   @VDP              to VRAM PDT
*
** Return to Basic
*
       MOV  @R11SAV,R11    restore Basic return address
       RT                  return to Basic
*
*== VDP utilities (entry point) =======================================
*
* R3 has address of VDP routine to execute
* R0..R2 have required parameters (see routine called)
*
VDP    MOV  R11,R4            save return
       STST R7                store status
       ANDI R7,>000F          only want interrupt mask
       LIMI 0                 disable interrupts
       B    *R3               branch to VDP routine
*
** Return to caller
*
VDPRET LIMI 0                 assume interrupts were disabled
       CI   R7,0              were they?
       JEQ  VDPRT1            yes, we're done
       LIMI 2                 no, enable interrupts
VDPRT1 B    *R4
*                            
** VDP multiple byte write   
*                            
VMBW   BL   @WVDPWA             Write out address
VWTMOR MOVB *R1+,@VDPWD         Write a byte
       DEC  R2                  Decrement byte count
       JNE  VWTMOR              More to write?
       JMP  VDPRET              Return to calling program
*                            
** VDP multiple byte read    
*                            
VMBR   BL   @WVDPRA             Write out address
VRDMOR MOVB @VDPRD,*R1+         Read a byte
       DEC  R2                  Decrement byte count
       JNE  VRDMOR              More to read?
       JMP  VDPRET              Return to calling program
*
** Set up to write to VDP
*
WVDPWA ORI  R0,>4000
*
** WRITE VDP ADDRESS (reading VRAM if WVDPWA not executed)
*
WVDPRA SWPB R0                   LSB first
       MOVB R0,@VDPWA            Write low byte of address
       SWPB R0                   Now MSB
       MOVB R0,@VDPWA            Write high byte of address
       RT                        Return to calling routine
*
*== fbFont Table for ASCII 32--127 ===================================
* 
* ...768 bytes to transfer to Pattern Descriptor Table (PDT)
*
FONTAB 
       DATA >0000,>0000,>0000,>0000    ' '
       DATA >1010,>1010,>1000,>1000    '!'
       DATA >2828,>2800,>0000,>0000    '"'
       DATA >2828,>7C28,>7C28,>2800    '#'
       DATA >3854,>5038,>1454,>3800    '$'
       DATA >6064,>0810,>204C,>0C00    '%'
       DATA >2050,>5020,>5448,>3400    '&'
       DATA >0808,>1000,>0000,>0000    "'"
       DATA >0810,>2020,>2010,>0800    '('
       DATA >2010,>0808,>0810,>2000    ')'
       DATA >0028,>107C,>1028,>0000    '*'
       DATA >0010,>107C,>1010,>0000    '+'
       DATA >0000,>0000,>3010,>2000    ','
       DATA >0000,>007C,>0000,>0000    '-'
       DATA >0000,>0000,>0030,>3000    '.'
       DATA >0004,>0810,>2040,>0000    '/'
       DATA >3844,>4C54,>6444,>3800    '0'
       DATA >1030,>1010,>1010,>3800    '1'
       DATA >3844,>0408,>1020,>7C00    '2'
       DATA >3844,>0418,>0444,>3800    '3'
       DATA >0818,>2848,>7C08,>0800    '4'
       DATA >7C40,>7804,>0444,>3800    '5'
       DATA >1820,>4078,>4444,>3800    '6'
       DATA >7C04,>0810,>2020,>2000    '7'
       DATA >3844,>4438,>4444,>3800    '8'
       DATA >3844,>443C,>0408,>3000    '9'
       DATA >0030,>3000,>3030,>0000    ':'
       DATA >0030,>3000,>3010,>2000    ';'
       DATA >0810,>2040,>2010,>0800    '<'
       DATA >0000,>7C00,>7C00,>0000    '='
       DATA >2010,>0804,>0810,>2000    '>'
       DATA >3844,>0408,>1000,>1000    '?'
       DATA >3844,>5C54,>5C40,>3800    '@'
       DATA >3844,>447C,>4444,>4400    'A'
       DATA >7824,>2438,>2424,>7800    'B'
       DATA >3844,>4040,>4044,>3800    'C'
       DATA >7824,>2424,>2424,>7800    'D'
       DATA >7C40,>4078,>4040,>7C00    'E'
       DATA >7C40,>4078,>4040,>4000    'F'
       DATA >3C40,>405C,>4444,>3800    'G'
       DATA >4444,>447C,>4444,>4400    'H'
       DATA >3810,>1010,>1010,>3800    'I'
       DATA >0404,>0404,>0444,>3800    'J'
       DATA >4448,>5060,>5048,>4400    'K'
       DATA >4040,>4040,>4040,>7C00    'L'
       DATA >446C,>5454,>4444,>4400    'M'
       DATA >4464,>6454,>4C4C,>4400    'N'
       DATA >7C44,>4444,>4444,>7C00    'O'
       DATA >7844,>4478,>4040,>4000    'P'
       DATA >3844,>4444,>5448,>3400    'Q'
       DATA >7844,>4478,>5048,>4400    'R'
       DATA >3844,>4038,>0444,>3800    'S'
       DATA >7C10,>1010,>1010,>1000    'T'
       DATA >4444,>4444,>4444,>3800    'U'
       DATA >4444,>4428,>2810,>1000    'V'
       DATA >4444,>4454,>5454,>2800    'W'
       DATA >4444,>2810,>2844,>4400    'X'
       DATA >4444,>2810,>1010,>1000    'Y'
       DATA >7C04,>0810,>2040,>7C00    'Z'
       DATA >3820,>2020,>2020,>3800    '['
       DATA >0040,>2010,>0804,>0000    '\'
       DATA >3808,>0808,>0808,>3800    ']'
       DATA >0010,>2844,>0000,>0000    '^'
       DATA >0000,>0000,>0000,>7C00    '_'
       DATA >0020,>1008,>0000,>0000    '`'
       DATA >0000,>3804,>3C44,>3C00    'a'
       DATA >4040,>7844,>4444,>7800    'b'
       DATA >0000,>3C40,>4040,>3C00    'c'
       DATA >0404,>3C44,>4444,>3C00    'd'
       DATA >0000,>3844,>7C40,>3800    'e'
       DATA >1824,>2070,>2020,>2000    'f'
       DATA >0000,>3C44,>443C,>0438    'g'
       DATA >4040,>5864,>4444,>4400    'h'
       DATA >1000,>3010,>1010,>7C00    'i'
       DATA >0400,>0404,>0404,>4438    'j'
       DATA >4040,>4448,>7048,>4400    'k'
       DATA >3010,>1010,>1010,>7C00    'l'
       DATA >0000,>6854,>5454,>5400    'm'
       DATA >0000,>5864,>4444,>4400    'n'
       DATA >0000,>3844,>4444,>3800    'o'
       DATA >0000,>7844,>4478,>4040    'p'
       DATA >0000,>3C44,>443C,>0404    'q'
       DATA >0000,>5864,>4040,>4000    'r'
       DATA >0000,>3C40,>3804,>7800    's'
       DATA >1010,>7C10,>1014,>0800    't'
       DATA >0000,>4444,>444C,>3400    'u'
       DATA >0000,>4444,>4428,>1000    'v'
       DATA >0000,>4444,>5454,>2800    'w'
       DATA >0000,>4428,>1028,>4400    'x'
       DATA >0000,>4444,>4C34,>0438    'y'
       DATA >0000,>7C08,>1020,>7C00    'z'
       DATA >1820,>2040,>2020,>1800    '{'
       DATA >1010,>1000,>1010,>1000    '|'
       DATA >3008,>0804,>0808,>3000    '}'
       DATA >0020,>5408,>0000,>0000    '~'
       DATA >FFFF,>FFFF,>FFFF,>FFFF    'DEL'

       END

 

 

The following code will work in both TI Basic (with E/A cartridge) and TI Extended Basic:

100 CALL INIT
110 CALL LOAD("DSK1.FBFNTB.obj")
120 CALL LINK("FBFNTB")
130 PRINT " !""#$%&'()*+,-./0123456789:;<=>[email protected][\]^_`abcdefghijklmnopqrstuvwxyz{|}~"&CHR$(127)
140 GOTO 140

The following ZIP file has the source, object and listing files: FBFNTB.zip

 

...lee

  • Like 5
  • Thanks 1

Share this post


Link to post
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.

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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...