News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Redfining all characters

Started by secmast, 17:25, 10 January 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

secmast


Hi all, Happy new year

I'm currently working on a VT100 terminal and  need to redefine all characters in ANSi
I got the definition done:

ANSI:
DEFB &00,&7E,&7E,&6C,&10,&38,&10,&00,&FF,&00,&FF,&0F,&3C,&3F,&7F,&99
DEFB &80,&02,&18,&66,&7F,&3E,&00,&18,&18,&18,&00,&00,&00,&00,&00,&00
DEFB &00,&10,&28,&28,&10,&C2,&30,&40,&10,&10,&92,&00,&00,&00,&00,&02
DEFB &7C,&10,&7C,&7C,&0C,&FE,&38,&FE,&7C,&7C,&00,&00,&08,&00,&20,&7C
DEFB &7C,&38,&FC,&7C,&FC,&FE,&FE,&3C,&82,&7C,&3E,&82,&80,&82,&82,&38... and so on...

Every DEFB entry contain two characters (8 bytes per character)
I've got some trouble to apply this using the firmware.

TXT GET MATRIX
TXT SET MATRIX
TXT SET M TABLE
TXT GET M TABLE

Knowing all caracters will be redefine and they are in order how to proceed in assembly.

Thanks in advance

Fessor

#1
With TXT_SET_M_TABLE you reserve a memory Area for a charset ( "Symbol After"-Command of Basic)
and with TXT_SET_MATRIX you fill it with your definitions. ("Symbol"-Command of Basic)

InitCharset
      LD         DE,<Number of first char> ; Flag for new Table in Ram, Reg D=0 - creates a new table
      LD         HL,charsetspace
      CALL       TXT_SET_M_TABLE

      LD         A,<Number of first char>
      LD         HL,ANSI ; Address of your definitions
defNextchar
      PUSH       AF
      PUSH       HL
      CALL       TXT_SET_MATRIX
      POP        HL
      POP        AF
      LD BC,8
      ADD        HL,BC
      INC        A
      JR         NZ,defNextchar
      RET
charsetspace:
      ds <number of bytes needed for the new charset>
   

secmast

Thanks, I had an answer on another forum but similar to your answer.
It works greats.

Powered by SMFPacks Menu Editor Mod