Schnelle und variable Text-Routinen

M.Malich & E.Grah

Zweck dieses Programms ist es, Text in beliebiger Grösse und unter beliebigem Winkel auf dem Bildschirm darzustellen. Zusätzlich kann die Schrift noch beliebig geneigt, also Kursiv dargestellt werden. Das Programm wurde vollständig in Maschinensprache geschrieben und kann von sämtlichen Hochsprachen genutzt werden.

Die Routinen sind dabei konsequent auf Geschwindigkeit getrimmt und daher sehr schnell. Das Beispielprogramm wurde in GFA-BASIC geschrieben. So ist sehr einfach ersichtlich, wie der Aufruf der Routinen zu erfolgen hat.

Die Zeichen wurden als Polygonzüge in einer 20*40-Matrix definiert. Die Tabelle ist dabei folgendermaßen aufgebaut: Zu Anfang steht der ASCIl-Code des jeweiligen Zeichens, anschließend folgt dann ein Polygonzug. Beginnend mit den x,y-Koordinaten der Startposition folgt dann eine Liste von Vektoren, jeweils zuerst die x, dann y-Ordinate. Das Ende eines Polygonzugs wird mit zwei Nullbytes gekennzeichnet. Der Abschluß eines Zeichens wild nach den zwei Nullbytes für den jeweiligen Polygonzug durch $FF markiert. Der Vorteil der Zeichendefinition in Form von Polygonzügen liegt im relativ geringen Rechenaufwand, der für die Manipulation der Zeichen erforderlich ist. Man braucht sich so nicht um jeden einzelnen Punkt des Zeichens zu kümmern, sondern nur um die jeweiligen Eckpunkte. Dies ist die übliche Technik, die von Plottern benutzt wird, um Schrift darzustellen.

Sämtliche Berechnungen beziehen sich jeweils auf einen Eckpunkt eines Polygonzugs, der die Koordinaten x,y habe.

Verkleinern/Vergrößern: Die Darstellung der Zeichen in beliebiger Größe wird durch die folgenden Formeln erreicht:

Schriftgröße in x-Richtung: X_neu:=X * X_Size
Schriftgröße in y-Richtung: Y_neu:=Y * Y_Size

Kursivdarstellung: Um die Schrift entsprechend zu neigen, wird die jeweilige x-Ordinate des Zeichens um einen bestimmten Betrag verschoben, der von der zugehörigen y-Ordinate abhängt:

X_neu:= X + Kursiv * Y

Rotation der Zeichen: Die Rotation eines Zeichens ist schon etwas komplexer. Denn hierbei handelt es sich um eine echte Koordinatentransformation mit Hilfe einer Rotationsmatrix. Die Matrix für eine Rotation im 2dimensionalen Raum hat dabei die folgende Form :

| Cos α - Sin α | | Sin α Cos α |

Damit erhält man die gedrehten Koordinaten durch die

Multiplikation der Matrix mit dem entsprechenden Vektor:

Komponentenweise ergibt sich damit:

X_neu:= X * Cos α - Y * Sin α
Y_neu:= X * Sin α + Y * Cos α

Die Rotation erfolgt dabei um den Ursprung des jeweiligen Zeichens. Dieser liegt in der linken unteren Ecke. Nachdem eine Ordinate entsprechend berechnet wurde, werden zum neuen x- und y-Wert noch die Bildschirmkoordinaten hinzuaddiert. Sind die Koordinaten von jeweils 2 Punkten berechnet worden, so wird eine Linie des Zeichens auf den Bildschirm gezeichnet.

Das Maschinenprogramm besteht aus 4 Teilen:

  1. der Initialisierung, in der eine Tabelle berechnet wird, die einen schnellen Zugriff aut die Daten jedes einzelnen Zeichens ermöglicht,

  2. einer Routine zur Einstellung der Ausgabeparameter (Zeichenfarbe, Maske für den Linienstil und Grafikmodus),

  3. einer Routine zur Einstellung der Textparameter (Sinus des Drehwinkels, Cosinus des Drehwinkels, Kursiv-Parameter, Größe in x- und y-Rich-tung),

  4. der eigentlichen Textausgabe.

Das GFA BASIC-Modul besteht aus vier Prozeduren:

  1. PROCEDURE text_install: lädt das Assemblerprogramm und reserviert den nötigen Speicherplatz. (Man hat hier die Wahl, ob man das Assemblerprogramm von Diskette bzw. Harddisk laden will, oder ob man es aus den DATA-Zeilen schaufeln läßt.)

  2. PROCEDURE text_color (col%, mask%, mode%)
    col%: Zeichenfarbe; mask%: Linienmaske (16-Bit Wort); mode%: Grafikmodus (0, 1,2 oder 3)

  3. PROCEDURE text_parameter(alpha,kursiv%,x_size%,y_size%)
    alpha : Drehwinkel in Bogenmaß (0-2π)
    kursiv% : Kursivkonstante (0-300)
    x_size%,y_size% : Zeichengröße (0-600)
    Bei negativer Größe werden die Buchstaben gespiegelt.

  4. PROCEDURE text_exec(a$,x_pos%,y_pos%)
    a$: auszugebender Text; x_pos%,y_pos%: Bildschirmposition in Pixel. Die Routinen text_color und text_parameter müssen nicht vor jeder Textausgabe aufgerufen werden, sondern nur, wenn man Parameter ändern möchte.

Das kurze GFA BASIC-Demoprogramm dient zum Testen der Textroutinen. Mit den Tasten + und - läßt sich der dargestellte Text rotieren. Mit den beiden Maustasten können Sie ihn vergrößern bzw. verkleinern. Der Text folgt außerdem den Mausbewegungen. Mit ein bißchen Geschick kann man das Rotieren auch flimmerfrei machen. Scheuen Sie sich nicht, mit den Textroutinen und den Parametern zu experimentieren. Durch getrenntes Vergrößern bzw. Verkleinern der x- und y-Größe lassen sich nette Effekte erzielen (Dehnen, Stauchen. Hochklappen, ...).

;   ************************************
;   *                                  *
;   *   SCHNELLE VARIABLE TEXTAUSGABE  *
;   *                                  *
;   *            VON                   *
;   *                                  *
;   *   M.MALICH        E.GRAH         *
;   *                                  *
;   *   (c) MAXON Computer GmbH        *
;   *                                  *
;   ************************************

INIT_LINE_A = $A000
LINE_A      = $A003
X1          = 38
PLANES      = 24
LSTLIN      = 32

;***********************************
    JMP     INIT_POINTER
    JMP     SET_PARAMETER
    JMP     SET_COLOR
    MOVE.L  4(SP),A1            ; TEXT_ADRESSE
    MOVEM   8(SP),D0/D1         ; (X,Y)-KOORD
    LEA     KURSIV,A3
    MOVE.L  18(A3),A0           ; LINE_A0 BLOCK
    MOVEQ   #0,D2
    MOVEQ   #0,D3
    MOVEQ   #0,D4
    MOVEQ   #0,D5

PLOT_CHAR:
    LEA     POINTER,A2
    MOVEQ   #0,D6
    MOVE.B  (A1)+,D6            ; NEUES ZEICHEN
    BEQ     FERTIG
    CMP.B   #32,D6              ; BLANK ??
    BEQ     ZEICHEN_FERTIG
    ADD     D6,D6               ; * 4
    ADD     D6,D6
    ADD.L   D6,A2               ; POINTER BERECHNEN
    TST.L   (A2)                ; ZEICHEN VORHANDEN ??
    BEQ     PLOT_CHAR
    MOVE.L  (A2),A2
    ADDQ.L  #1,A2
NEW_POLYGON:
    MOVE.B  (A2)+,D2            ; POLYGONSTART
    BMI     ZEICHEN_FERTIG
    MOVE.B  (A2)+,D3
POLYGON:
    MOVE.B  (A2)+,D4            ; DRAW TO (D4,D5)
    MOVE.B  (A2)+,D5
    BNE     NEXT
    TST.B   D4                  ; POLYGONENDE ??
    BEQ     NEW_POLYGON
NEXT:
    ADD.B   D2,D4
    ADD.B   D3,D5

    MOVEM.L D0-D2/D4-D5/A0-A2,-(SP)
    MOVE    D3,D6               ; FROM_Y
    MULS    (A3),D6             ; * KURSIV
    ASR     #8,D6
    ADD     D6,D2               ; + FROM_X = FROM_X
    MOVE    D5,D6               ; TO_Y
    MULS    (A3),D6             ; * KURSIV
    ASR     #8,D6
    ADD     D6,D4               ; + TO_X = TO_X

    MOVE    D2,D6               ; FROM_X
    MULS    16(A3),D6           ; * Y_COS
    MOVE    D3,D7               ; FROM_Y
    MULS    14(A3),D7           ; * Y_SIN
    SUB     D7,D6               ; -
    ASR     #8,D6
    MOVE    D6,A6               ; = NEW FROM_X

    MOVE    D2,D6               ; FROM_X
    MULS    10(A3),D6           ; * X_SIN
    MOVE    D3,D7               ; FROM_Y
    MULS    12(A3),D7           ; * X_COS
    ADD     D7,D6               ; +
    ASR     #8,D6
    MOVE    D6,A5               ; = NEW FROM_Y

    MOVE    D4,D6               ; TO_X
    MULS    16(A3),D6           ; * Y_COS
    MOVE    D5,D7               ; TO_Y
    MULS    14(A3),D7           ; * Y_SIN
    SUB     D7,D6               ; -
    ASR     #8,D6
    MOVE    D6,A4               ; = NEW TO_X

    MULS    10(A3),D4           ; TO_X * X_SIN
    MULS    12(A3),D5           ; TO_Y * X_COS
    ADD     D4,D5               ; +
    ASR     #8,D5               ; = NEW TO_Y

    MOVE    D1,D6
    ADD     D0,A6               ; + X
    ADD     D0,A4
    SUB     A5,D6               ; Y -
    SUB     D5,D1
    EXG     D1,A6
    MOVEM   D1/D6/A4/A6,X1(A0)
    DC.W    LINE_A
    MOVEM.L (SP)+,D0-D2/D4-D5/A0-A2

    MOVE.B  D4,D2
    MOVE.B  D5,D3
    BRA     POLYGON
ZEICHEN_FERTIG:
    ADD     6(A3),D0            ; + OFFSET_X
    SUB     8(A3),D1            ; + OFFSET_Y
    BRA     PLOT_CHAR
FERTIG:
    RTS

;***********************************
INIT_POINTER:
    LEA     POINTER,A0
    LEA     ZEICHEN,A1
    CLR.L   (A0)+
    MOVEQ   #0,D0
LOOP:
    MOVEQ   #0,D1
    MOVE.B  (A1),D1
    MOVE    D1,D2
    SUB     D0,D2
    SUBQ    #2,D2
    BMI     WEG
LOOP_2:
    CLR.L   (A0)+
    DBRA    D2,LOOP_2
WEG:
    MOVE    D1,D0
    MOVE.L  A1,(A0)+
SUCHE_CHAR:
    MOVE.B  (A1)+,D1
    CMP.B   #$FF,D1
    BNE     SUCHE_CHAR
    TST.B   -2(A1)
    BNE     SUCHE_CHAR
    TST.B   -3(A1)
    BNE     SUCHE_CHAR
    CMP.B   #$FF,(A1)
    BNE     LOOP
    MOVEQ   #1,D5 ; COLOR
    MOVEQ   #-1,D6 ; MASK
    MOVEQ   #0,D7 ; GRAPHMODE
    BRA     INIT_COLOR
;***********************************
SET_COLOR:
    MOVEM   4(SP),D5-D7         ; COLOR/MASK/MODE
INIT_COLOR:
    DC.W    INIT_LINE_A
    LEA     LINE_A0,A1
    MOVE.L  A0,(A1)
    MOVEQ   #-1,D0
    MOVEM   D0/D6/D7,LSTLIN(A0)
    MOVEQ   #0,D0
    MOVEQ   #0,D1
    MOVEQ   #0,D2
    MOVEQ   #0,D3
    BTST    #0,D5
    BEQ     PLANE_1
    MOVEQ   #1,D0
PLANE_1:
    BTST    #1,D5
    BEQ     PLANE_2
    MOVEQ   #1,D1
PLANE_2:
    BTST    #2,D5
    BEQ     PLANE_3
    MOVEQ   #1,D2
PLANE_3:
    BTST    #3,D5
    BEQ     PLANE_4
    MOVEQ   #1,D3
PLANE_4:
    MOVEM   D0-D3,PLANES(A0)
    RTS
;***********************************
SET_PARAMETER:
    LEA     KURSIV,A0
    MOVEM   4(SP),D0-D4         ; PARAMETER_BLOCK
    MOVEM   D2-D4,(A0)
    MOVE    D0,D5               ; SIN
    MULS    D3,D5               ; * SIZE_X
    ASR.L   #8,D5
    MOVE    D1,D6               ; COS
    MULS    D3,D6               ; * SIZE_X
    ASR.L   #8,D6
    MOVE    D1,D7               ; COS
    MULS    D4,D7               ; * SIZE_Y
    ASR.L   #8,D7
    MOVE    D7,A1
    MOVE    D0,D7               ; SIN
    MULS    D4,D7               ; * SIZE_Y
    ASR.L   #8,D7

    MOVEQ   #25,D2
    EXG     D3,D4
    MULU    D2,D3
    MULS    D1,D3               ; * COS
    SWAP    D3                  ; /256/256
    MULU    D2,D4
    MULS    D0,D4               ; * SIN
    SWAP    D4                  ; /256/2S6
    MOVEM   D3-D7/A1,6(A0)
    RTS

;***********************************

ZEICHEN:
    DC.B $21,$08,$0B,$00,$04,$04,$00,$00,$FC,$FC,$00,$00
    DC.B $00,$0A,$14,$FB,$14,$0B,$00,$FA,$EC,$00,$00,$FF
    DC.B $22,$03,$28,$05,$00,$00,$F6,$FB,$0A,$00,$00,$0D
    DC.B $28,$05,$00,$00,$F6,$FB,$0A,$00,$00,$FF,$24,$03
    DC.B $0F,$04,$FC,$07,$00,$04,$04,$00,$07,$FC,$04,$F9
    DC.B $00,$FC,$04,$00,$06,$04,$04,$07,$00,$04,$FC,$00
    DC.B $00,$0B,$28,$00,$E3,$00,$00,$FF,$25,$03,$0B,$0F
    DC.B $1D,$00,$00,$03,$28,$07,$00,$00,$F9,$F9,$00,$00
    DC.B $07,$00,$00,$0B,$12,$07,$00,$00,$F9,$F9,$00,$00
    DC.B $07,$00,$00,$FF,$26,$12,$16,$FC,$00,$00,$F9,$FC
    DC.B $FC,$FD,$00,$FC,$04,$00,$07,$0B,$08,$00,$06,$FC
    DC.B $04,$FB,$FC,$00,$FA,$0D,$ED,$00,$00,$FF,$27,$08
    DC.B $28,$05,$00,$00,$F6,$FB,$0A,$00,$00,$FF,$28,$06
    DC.B $0B,$FD,$09,$00,$0B,$03,$09,$00,$00,$FF,$29,$0F
    DC.B $0B,$03,$09,$00,$0B,$FD,$09,$00,$00,$FF,$2A,$03
    DC.B $1A,$10,$00,$00,$00,$0B,$12,$00,$10,$00,$00,$03
    DC.B $12,$10,$10,$00,$00,$03,$22,$10,$F0,$00,$00,$FF
    DC.B $2B,$03,$1A,$10,$00,$00,$00,$0B,$12,$00,$10,$00
    DC.B $00,$FF,$2C,$08,$0F,$00,$05,$04,$00,$00,$FB,$FD
    DC.B $FC,$01,$04,$FE,$00,$00,$00,$FF,$2D,$03,$1A,$0F
    DC.B $00,$00,$00,$FF,$2E,$08,$0B,$00,$04,$04,$00,$00
    DC.B $FC,$FC,$00,$00,$00,$FF,$2F,$03,$0B,$0F,$1D,$00
    DC.B $00,$FF,$30,$03,$0F,$00,$15,$04,$04,$07,$00,$04
    DC.B $FC,$00,$EB,$FC,$FC,$F9,$00,$FC,$04,$0F,$15,$00
    DC.B $00,$FF,$31,$03,$1A,$08,$0E,$00,$E3,$00,$00,$FF
    DC.B $32,$03,$1E,$00,$06,$04,$04,$07,$00,$04,$FC,$00
    DC.B $FA,$F1,$ED,$0F,$00,$00,$00,$FF,$33,$03,$28,$0F
    DC.B $00,$F9,$F2,$03,$00,$04,$FC,$00,$F9,$FC,$FC,$F9
    DC.B $00,$FC,$04,$00,$00,$FF,$34,$03,$0F,$0B,$19,$00
    DC.B $00,$0E,$14,$00,$F7,$00,$00,$03,$0F,$0F,$00,$00
    DC.B $00,$FF,$35,$03,$0F,$04,$FC,$07,$00,$04,$04,$00
    DC.B $07,$FC,$04,$F5,$00,$00,$0E,$0F,$00,$00,$00,$FF
    DC.B $36,$03,$16,$04,$04,$07,$00,$04,$FC,$00,$F9,$FC
    DC.B $FC,$F9,$00,$FC,$04,$00,$15,$04,$04,$07,$00,$04
    DC.B $FC,$00,$00,$FF,$37,$03,$28,$0F,$00,$F5,$E3,$00
    DC.B $00,$FF,$38,$03,$0F,$00,$07,$04,$04,$07,$00,$04
    DC.B $04,$00,$06,$FC,$04,$F9,$00,$FC,$FC,$00,$FA,$04
    DC.B $FC,$00,$00,$0E,$1A,$04,$FC,$00,$F9,$FC,$FC,$F9
    DC.B $00,$FC,$04,$00,$00,$FF,$39,$03,$0F,$04,$FC,$07
    DC.B $00,$04,$04,$00,$15,$FC,$04,$F9,$00,$FC,$FC,$00
    DC.B $FA,$04,$FC,$0B,$00,$00,$00,$FF,$3A,$08,$19,$00
    DC.B $05,$04,$00,$00,$FB,$FC,$00,$00,$00,$08,$0F,$00
    DC.B $05,$04,$00,$00,$FB,$FC,$00,$00,$00,$FF,$3B,$08
    DC.B $19,$00,$05,$04,$00,$00,$FB,$FC,$00,$00,$00,$08
    DC.B $0F,$00,$05,$04,$00,$00,$FB,$FD,$FC,$01,$04,$FE
    DC.B $00,$00,$00,$FF,$3C,$0A,$10,$F9,$07,$07,$07,$00
    DC.B $00,$FF,$3D,$03,$1D,$0F,$00,$00,$00,$12,$17,$F1
    DC.B $00,$00,$00,$FF,$3E,$0B,$1E,$07,$F9,$F9,$F9,$00
    DC.B $00,$FF,$3F,$08,$0B,$00,$04,$04,$00,$00,$FC,$FC
    DC.B $00,$00,$00,$08,$14,$0A,$0A,$00,$06,$FC,$04,$F9
    DC.B $00,$FC,$FC,$07,$00,$03,$FD,$FB,$F3,$00,$00,$FF
    DC.B $41,$03,$0B,$00,$19,$04,$04,$07,$00,$04,$FC,$00
    DC.B $E7,$00,$00,$12,$1A,$F1,$00,$00,$00,$FF,$42,$03
    DC.B $0B,$00,$1D,$0B,$00,$04,$FC,$00,$FA,$FC,$FC,$F5
    DC.B $00,$00,$00,$0E,$1A,$04,$FC,$00,$F9,$FC,$FC,$F5
    DC.B $00,$00,$00,$FF,$43,$12,$0F,$FC,$FC,$F9,$00,$FC
    DC.B $04,$00,$15,$04,$04,$07,$00,$04,$FC,$00,$00,$FF
    DC.B $44,$03,$0B,$00,$1D,$0B,$00,$04,$FC,$00,$EB,$FC
    DC.B $FC,$F5,$00,$00,$00,$FF,$45,$03,$0B,$00,$1D,$0F
    DC.B $00,$00,$00,$0E,$1A,$F5,$00,$00,$00,$03,$0B,$0F
    DC.B $00,$00,$00,$FF,$46,$03,$0B,$00,$1D,$0F,$00,$00
    DC.B $00,$0E,$1A,$F5,$00,$00,$00,$FF,$47,$0B,$1A,$07
    DC.B $00,$00,$F5,$FC,$FC,$F9,$00,$FC,$04,$00,$15,$04
    DC.B $04,$07,$00,$04,$FC,$00,$00,$FF,$48,$03,$0B,$00
    DC.B $1D,$00,$00,$12,$28,$00,$E3,$00,$00,$12,$1A,$F1
    DC.B $00,$00,$00,$FF,$49,$07,$0B,$07,$00,$00,$00,$0B
    DC.B $0B,$00,$1D,$00,$00,$07,$28,$07,$00,$00,$00,$FF
    DC.B $4A,$03,$0F,$04,$FC,$07,$00,$04,$04,$00,$19,$00
    DC.B $00,$FF,$4B,$03,$0B,$00,$1D,$00,$00,$12,$28,$F9
    DC.B $F2,$F8,$00,$00,$00,$0B,$1A,$07,$F1,$00,$00,$FF
    DC.B $4C,$03,$28,$00,$E3,$0F,$00,$00,$00,$FF,$4D,$03
    DC.B $0B,$00,$1D,$08,$F2,$07,$0E,$00,$E3,$00,$00,$FF
    DC.B $4E,$03,$0B,$00,$1D,$0F,$E3,$00,$1D,$00,$00,$FF
    DC.B $4F,$03,$0F,$00,$15,$04,$04,$07,$00,$04,$FC,$00
    DC.B $EB,$FC,$FC,$F9,$00,$FC,$04,$00,$00,$FF,$50,$03
    DC.B $0B,$00,$1D,$0B,$00,$04,$FC,$00,$FA,$FC,$FC,$F5
    DC.B $00,$00,$00,$FF,$51,$03,$0F,$00,$15,$04,$04,$07
    DC.B $00,$04,$FC,$00,$EB,$FC,$FC,$F9,$00,$FC,$04,$00
    DC.B $00,$0E,$0F,$04,$FC,$00,$00,$FF,$52,$03,$0B,$00
    DC.B $1D,$0B,$00,$04,$FC,$00,$FA,$FC,$FC,$F5,$00,$00
    DC.B $00,$0E,$1A,$04,$F1,$00,$00,$FF,$53,$03,$0F,$04
    DC.B $FC,$07,$00,$04,$04,$00,$07,$FC,$04,$F9,$00,$FC
    DC.B $04,$00,$06,$04,$04,$07,$00,$04,$FC,$00,$00,$FF
    DC.B $54,$0B,$0B,$00,$1D,$00,$00,$03,$28,$0F,$00,$00
    DC.B $00,$FF,$55,$03,$28,$00,$E7,$04,$FC,$07,$00,$04
    DC.B $04,$00,$19,$00,$00,$FF,$56,$03,$28,$08,$E3,$07
    DC.B $1D,$00,$00,$FF,$57,$03,$28,$00,$E7,$04,$FC,$04
    DC.B $04,$03,$FC,$04,$04,$00,$19,$00,$00,$FF,$58,$03
    DC.B $28,$0F,$E3,$00,$00,$03,$0B,$0F,$1D,$00,$00,$FF
    DC.B $59,$03,$28,$08,$F2,$07,$0E,$00,$00,$0B,$1A,$00
    DC.B $F1,$00,$00,$FF,$5A,$03,$28,$0F,$00,$F1,$E3,$0F
    DC.B $00,$00,$00,$FF,$61,$03,$0F,$00,$07,$04,$04,$07
    DC.B $00,$04,$FC,$00,$00,$12,$1A,$00,$F1,$00,$00,$12
    DC.B $0F,$FC,$FC,$F9,$00,$FC,$04,$00,$00,$FF,$62,$03
    DC.B $0B,$00,$1D,$00,$00,$03,$16,$04,$04,$07,$00,$04
    DC.B $FC,$00,$F9,$FC,$FC,$F9,$00,$FC,$04,$00,$00,$FF
    DC.B $63,$12,$0F,$FC,$FC,$F9,$00,$FC,$04,$00,$07,$04
    DC.B $04,$07,$00,$04,$FC,$00,$00,$FF,$64,$12,$0F,$FC
    DC.B $FC,$F9,$00,$FC,$04,$00,$07,$04,$04,$07,$00,$04
    DC.B $FC,$00,$00,$12,$28,$00,$E3,$00,$00,$FF,$65,$12
    DC.B $0F,$FC,$FC,$F9,$00,$FC,$04,$00,$07,$04,$04,$07
    DC.B $00,$04,$FC,$00,$FC,$F1,$00,$00,$00,$FF,$66,$07
    DC.B $0B,$00,$19,$04,$04,$03,$00,$04,$FC,$00,$00,$0B
    DC.B $1A,$F8,$00,$00,$00,$FF,$67,$03,$05,$04,$FC,$07
    DC.B $00,$04,$04,$00,$15,$00,$00,$12,$16,$FC,$04,$F9
    DC.B $00,$FC,$FC,$00,$F9,$04,$FC,$07,$00,$04,$04,$00
    DC.B $00,$FF,$68,$03,$0B,$00,$1D,$00,$00,$03,$16,$04
    DC.B $04,$07,$00,$04,$FC,$00,$F5,$00,$00,$FF,$69,$07
    DC.B $0B,$07,$00,$00,$00,$0B,$0B,$00,$0F,$FC,$00,$00
    DC.B $00,$0B,$1F,$00,$03,$00,$00,$FF,$6A,$05,$05,$04
    DC.B $FC,$03,$00,$04,$04,$00,$15,$00,$00,$10,$1F,$00
    DC.B $03,$00,$00,$FF,$6B,$03,$0B,$00,$1D,$00,$00,$12
    DC.B $1B,$F1,$F8,$0F,$F8,$00,$00,$FF,$€C,$07,$0B,$07
    DC.B $00,$00,$00,$0B,$0B,$00,$1D,$FC,$00,$00,$00,$FF
    DC.B $6D,$03,$0B,$00,$0F,$00,$00,$03,$16,$04,$04,$04
    DC.B $FC,$00,$F5,$00,$00,$0B,$16,$04,$04,$04,$FC,$00
    DC.B $F5,$00,$00,$FF,$6E,$03,$0B,$00,$0F,$00,$00,$03
    DC.B $16,$04,$04,$07,$00,$04,$FC,$00,$F5,$00,$00,$FF
    DC.B $6F,$03,$0F,$00,$07,$04,$04,$07,$00,$04,$FC,$00
    DC.B $F9,$FC,$FC,$F9,$00,$FC,$04,$00,$00,$FF,$70,$03
    DC.B $01,$00,$19,$00,$00,$03,$16,$04,$04,$07,$00,$04
    DC.B $FC,$00,$F9,$FC,$FC,$F9,$00,$FC,$04,$00,$00,$FF
    DC.B $71,$12,$0F,$FC,$FC,$F9,$00,$FC,$04,$00,$07,$04
    DC.B $04,$07,$00,$04,$FC,$00,$00,$12,$1A,$00,$E7,$00
    DC.B $00,$FF,$72,$03,$0B,$00,$0F,$00,$00,$03,$16,$04
    DC.B $04,$07,$00,$04,$FC,$00,$00,$FF,$73,$03,$0F,$04
    DC.B $FC,$07,$00,$04,$04,$FC,$04,$F8,$00,$FD,$03,$04
    DC.B $04,$07,$00,$04,$FC,$00,$00,$FF,$74,$12,$0F,$FC
    DC.B $FC,$FC,$00,$FC,$04,$00,$19,$00,$00,$03,$1A,$06
    DC.B $00,$00,$00,$FF,$75,$03,$1A,$00,$F5,$04,$FC,$07
    DC.B $00,$04,$04,$00,$00,$12,$0B,$00,$0F,$00,$00,$FF
    DC.B $76,$03,$1A,$07,$F1,$01,$00,$07,$0F,$00,$00,$FF
    DC.B $77,$03,$1A,$00,$F5,$04,$FC,$04,$04,$04,$FC,$04
    DC.B $04,$00,$0B,$00,$00,$FF,$78,$03,$1A,$0F,$F1,$00
    DC.B $00,$03,$0B,$0F,$0F,$00,$00,$FF,$79,$03,$05,$04
    DC.B $FC,$07,$00,$04,$04,$00,$15,$00,$00,$03,$1A,$00
    DC.B $F5,$04,$FC,$07,$00,$04,$04,$00,$00,$FF,$7A,$03
    DC.B $1A,$0F,$00,$F1,$F1,$0F,$00,$00,$00,$FF,$81,$03
    DC.B $1A,$00,$F5,$04,$FC,$07,$00,$04,$04,$00,$00,$12
    DC.B $0B,$00,$0F,$00,$00,$07,$1C,$00,$03,$00,$00,$0E
    DC.B $1C,$00,$03,$00,$00,$FF,$84,$03,$0F,$00,$07,$04
    DC.B $04,$07,$00,$04,$FC,$00,$00,$12,$1A,$00,$F1,$00
    DC.B $00,$12,$0F,$FC,$FC,$F9,$00,$FC,$04,$00,$00,$07
    DC.B $1C,$00,$03,$00,$00,$0E,$1C,$00,$03,$00,$00,$FF
    DC.B $8E,$03,$0B,$00,$19,$04,$04,$07,$00,$04,$FC,$00
    DC.B $E7,$00,$00,$12,$1A,$F1,$00,$00,$00,$07,$2B,$00
    DC.B $03,$00,$00,$0E,$2B,$00,$03,$00,$00,$FF,$94,$03
    DC.B $0F,$00,$07,$04,$04,$07,$00,$04,$FC,$00,$F9,$FC
    DC.B $FC,$F9,$00,$FC,$04,$00,$00,$07,$1C,$00,$03,$00
    DC.B $00,$0E,$1C,$00,$03,$00,$00,$FF,$99,$03,$0F,$00
    DC.B $15,$04,$04,$07,$00,$04,$FC,$00,$EB,$FC,$FC,$F9
    DC.B $00,$FC,$04,$00,$00,$07,$2B,$00,$03,$00,$00,$0E
    DC.B $2B,$00,$03,$00,$00,$FF,$9A,$03,$28,$00,$E7,$04
    DC.B $FC,$07,$00,$04,$04,$00,$19,$00,$00,$07,$2B,$00
    DC.B $03,$00,$00,$0E,$2B,$00,$03,$00,$00,$FF,$9E,$03
    DC.B $01,$00,$23,$04,$04,$07,$00,$04,$FC,$00,$FA,$FC
    DC.B $FC,$FD,$00,$00,$00,$0E,$1A,$04,$FC,$00,$F9,$FC
    DC.B $FC,$F9,$00,$00,$00,$FF,$FF

KURSIV:         DC.W 0
SIZE_X:         DC.W 0
SIZE_Y:         DC.W 0
OFFSET_X:       DC.W 0
OFFSET_Y:       DC.W 0
X_SIN:          DC.W 0
X_COS:          DC.W 0
Y_SIN:          DC.W 0
Y_COS:          DC.W 0
LINE_A0:        DC.L 0
POINTER:        DS.L 256,0

    END
' ************************************
' *                                  *
' *   SCHNELLE VARIABLE TEXTAUSGABE  *
' *                                  *
' *                 VON              *
' *                                  *
' *     M.MALICH         E.GRAH      *
' *                                  *
' *     (c) MAXON Computer GmbH      *
' *                                  *
' ************************************
'
Procedure Text_install 
    Local Z%,Wert%
    Dim Text!(3500*8)
    Text_init%=Varptr(Text!(0)) 
    Text_parameter%=Text_init%+4 
    Text_color%=Text_init% + 8 
    Text_exec%=Text_init%+12 
    ' *********************************************
    ' ** Entweder die Maschinenspracheroutinen
    ' ** werden von Diskette bzw. HD geladen,
    ' *********************************************
    ' Bload "TEXT.B",Text_init%
    ' *********************************************
    ' ** oder der Maschinencode wird aus den
    ' ** DATA-Zeilen eingelesen.
    ' *********************************************
    Restore Text_daten
    T%=Text_init%
    Do
        Read Wert%
        Exit If Wert%=-1 
        Poke T%,Wert%
        Inc T%
    Loop
    '
    '
    Void C:Text_init%()
Return
'
Procedure Text_color(Col%,Mask%,Mode%)
    Void C:Text_color%(Col%,Mask%,Mode%)
Return
'
Procedure Text_parameter(Alpha,Kursiv%,X_size%,Y_size%)
    Void C:Text_parameter%(Sin(Alpha)*256,Cos(Alpha)*256,Kursiv%,X_size%,Y_size%)
Return
'
Procedure Text_exec(A$,X_pos%,Y_pos%)
    Void C:Text_exec%(L:Varptr(A$),X_pos%,Y_pos%) 
Return
'
'
'  **********************************************
'  ** Die folgenden DATA-Zeilen werden nur
'  ** benötigt, wenn man die Maschinensprache-
'  ** routinen nicht von Diskette bzw. HD lädt.
'  **********************************************
'
Text_daten:
'
Data 78,250,0,226,78,250,1,116,78,250,1,34,34,111,0,4,76
Data 175,0,3,0,8,71,250,9,6,32,107,0,18,116,0,118,0,120
Data 0,122,0,69,250,9,12,124,0,28,25,103,0,0,178,188,60
Data 0,32,103,0,0,158,220,70,220,70,213,198,74,146,103
Data 226,36,82,82,138,20,26,107,0,0,138,22,26,24,26,26
Data 26,102,0,0,6,74,4,103,236,216,2,218,3,72,231,236,224
Data 60,3,205,211,224,70,212,70,60,5,205,211,224,70,216
Data 70,60,2,205,235,0,16,62,3,207,235,0,14,156,71,224
Data 70,60,70,60,2,205,235,0,10,62,3,207,235,0,12 ,220,71
Data 224,70,58,70,60,4,205,235,0,16,62,5,207,235,0,14,156
Data 71,224,70,56,70,201,235,0,10,203,235,0,12,218,68,224
Data 69,60,1,220,192,216,192,156,77,146,69,195,142,72,168
Data 80,66,0,38,160,3,76,223,7,55,20,4,22,5,96,0,255,124
Data 208,107,0,6,146,107,0,8,96,0,255,70,78,117,65,250
Data 8,78,67,250,0,208,66,152,112,0,114,0,18,17,52,1,148
Data 64,85,66,107,0,0,8,66,152,81,202,255,252,48,1,32,201
Data 18,25,178,60,0,255,102,248,74,41,255,254,102,242,74
Data 41,255,253,102,236,12,17,0,255,102,206,122,1,124,255
Data 126,0,96,0,0,8,76,175,0,224,0,4,160,0,67,250,7,250
Data 34,136,112,255,72,168,0,193,0,32,112,0,114,0,116,0
Data 118,0,8,5,0,0,103,0,0,4,112,1,8,5,0,1,103,0,0,4,114
Data 1,8,5,0,2,103,0,0,4,116,1,8,5,0,3,103,0,0,4,118,1
Data 72,168,0,15,0,24,78,117,65,250,7,162,76,175,0,31,0
Data 4,72,144,0,28,58,0,203,195,224,133,60,1,205,195,224
Data 134,62,1,207,196,224,135,50,71,62,0,207,196,224,135
Data 116,25,201,67,198,194,199,193,72,67,200,194,201,192
Data 72,68,72,168,2,248,0,6,78,117,33,8,11,0,4,4,0,0,252
Data 252,0,0,0,10,20,251,20,11,0,250,236,0,0,255,34,3,40
Data 5,0,0,246,251,10,0,0,13,40,5,0,0,246,251,10,0,0,255
Data 36,3,15,4,252,7,0,4,4,0,7,252,4,249,0,252,4,0,6,4
Data 4,7,0,4,252,0,0,11,40,0,227,0,0,255,37,3,11,15,29
Data 0,0,3,40,7,0,0,249,249,0,0,7,0,0,11,18,7,0,0,249,249
Data 0,0,7,0,0,255,38,18,22,252,0,0,249,252,252,253,0,252
Data 4,0,7,11,8,0,6,252,4,251,252,0,250,13,237,0,0,255
Data 39,8,40,5,0,0,246,251,10,0,0,255,40,6,11,253,9,0,11
Data 3,9,0,0,255,41,15,11,3,9,0,11,253,9,0,0,255,42,3,26
Data 16,0,0,0,11,18,0,16,0,0,3,18,16,16,0,0,3,34,16,240
Data 0,0,255,43,3,26,16,0,0,0,11,18,0,16,0,0,255,44,8,15
Data 0,5,4,0,0,251,253,252,1,4,254,0,0,0,255,45,3,26,15
Data 0,0,0,255,46,8,11,0,4,4,0,0,252,252,0,0,0,255,47,3
Data 11,15,29,0,0,255,48,3,15,0,21,4,4,7,0,4,252,0,235
Data 252,252,249,0,252,4,15,21,0,0,255,49,3,26,8,14,0,227
Data 0,0,255,50,3,30,0,6,4,4,7,0,4,252,0,250,241,237,15
Data 0,0,0,255,51,3,40,15,0,249,242,3,0,4,252,0,249,252
Data 252,249,0,252,4,0,0,255,52,3,15,11,25,0,0,14,20,0
Data 247,0,0,3,15,15,0,0,0,255,53,3,15,4,252,7,0,4,4,0
Data 7,252,4,245,0,0,14,15,0,0,0,255,54,3,22,4,4,7,0,4
Data 252,0,249,252,252,249,0,252,4,0,21,4,4,7,0,4,252,0
Data 0,255,55,3,40,15,0,245,227,0,0,255,56,3,15,0,7,4,4
Data 7,0,4,4,0,6,252,4,249,0,252,252,0,250,4,252,0,0,14
Data 26,4,252,0,249,252,252,249,0,252,4,0,0,255,57,3,15
Data 4,252,7,0,4,4,0,21,252,4,249,0,252,252,0,250,4,252
Data 11,0,0,0,255,58,8,25,0,5,4,0,0,251,252,0,0,0,8,15
Data 0,5,4,0,0,251,252,0,0,0,255,59,8,25,0,5,4,0,0,251
Data 252,0,0,0,8,15,0,5,4,0,0,251,253,252,1,4,254,0,0,0
Data 255,60,10,16,249,7,7,7,0,0,255,61,3,29,15,0,0,0,18
Data 23,241,0,0,0,255,62,11,30,7,249,249,249,0,0,255,63
Data 8,11,0,4,4,0,0,252,252,0,0,0,8,20,10,10,0,6,252,4
Data 249,0,252,252,7,0,3,253,251,243,0,0,255,65,3,11,0
Data 25,4,4,7,0,4,252,0,231,0,0,18,26,241,0,0,0,255,66
Data 3,11,0,29,11,0,4,252,0,250,252,252,245,0,0,0,14,26
Data 4,252,0,249,252,252,245,0,0,0,255,67,18,15,252,252
Data 249,0,252,4,0,21,4,4,7,0,4,252,0,0,255,68,3,11,0,29
Data 11,0,4,252,0,235,252,252,245,0,0,0,255,69,3,11,0,29
Data 15,0,0,0,14,26,245,0,0,0,3,11,15,0,0,0,255,70,3,11
Data 0,29,15,0,0,0,14,26,245,0,0,0,255,71,11,26,7,0,0,245
Data 252,252,249,0,252,4,0,21,4,4,7,0,4,252,0,0,255,72
Data 3,11,0,29,0,0,18,40,0,227,0,0,18,26,241,0,0,0,255
Data 73,7,11,7,0,0,0,11,11,0,29,0,0,7,40,7,0,0,0,255,74
Data 3,15,4,252,7,0,4,4,0,25,0,0,255,75,3,11,0,29,0,0,18
Data 40,249,242,248,0,0,0,11,26,7,241,0,0,255,76,3,40,0 
Data 227,15,0,0,0,255,77,3,11,0,29,8,242,7,14,0,227,0,0
Data 255,78,3,11,0,29,15,227,0,29,0,0,255,79,3,15,0,21
Data 4,4,7,0,4,252,0,235,252,252,249,0,252,4,0,0,255,80
Data 3,11,0,29,11,0,4,252,0,250,252,252,245,0,0,0,255,81
Data 3,15,0,21,4,4,7,0,4,252,0,235,252,252,249,0,252,4
Data 0,0,14,15,4,252,0,0,255,82,3,11,0,29,11,0,4,252,0
Data 250,252,252,245,0,0,0,14,26,4,241,0,0,255,83,3,15
Data 4,252,7,0,4,4,0,7,252,4,249,0,252,4,0,6,4,4,7,0,4
Data 252,0,0,255,84,11,11,0,29,0,0,3,40,15,0,0,0,255,85
Data 3,40,0,231,4,252,7,0,4,4,0,25,0,0,255,86,3,40,8,227
Data 7,29,0,0,255,87,3,40,0,231,4,252,4,4,3,252,4,4,0,25
Data 0,0,255,88,3,40,15,227,0,0,3,11,15,29,0,0,255,89,3
Data 40,8,242,7,14,0,0,11,26,0,241,0,0,255,90,3,40,15,0
Data 241,227,15,0,0,0,255,97,3,15,0,7,4,4,7,0,4,252,0,0
Data 18,26,0,241,0,0,18,15,252,252,249,0,252,4,0,0,255
Data 98,3,11,0,29,0,0,3,22,4,4,7,0,4,252,0,249,252,252
Data 249,0,252,4,0,0,255,99,19,15,252,252,249,0,252,4,0
Data 7,4,4,7,0,4,252,0,0,255,100,18,15,252,252,249,0,252
Data 4,0,7,4,4,7,0,4,252,0,0,18,40,0,227,0,0,255,101,18
Data 15,252,252,249,0,252,4,0,7,4,4,7,0,4,252,0,252,241
Data 0,0,0,255,102,7,11,0,25,4,4,3,0,4,252,0,0,11,26,248
Data 0,0,0,255,103,3,5,4,252,7,0,4,4,0,21,0,0,18,22,252
Data 4,249,0,252,252,0,249,4,252,7,0,4,4,0,0,255,104,3
Data 11,0,?9,0,0,3,22,4,4,7,0,4,252,0,245,0,0,255,105,7
Data 11,7,0,0,0,11,11,0,15,252,0,0,0,11,31,0,3,0,0,255
Data 106,5,5,4,252,3,0,4,4,0,21,0,0,16,31,0,3,0,0,255,107
Data 3,11,0,29,0,0,18,27,241,248,15,248,0,0,255,108,7,11
Data 7,0,0,0,11,11,0,29,252,0,0,0,255,109,3,11,0,15,0,0
Data 3,22,4,4,4,252,0,245,0,0,11,22,4,4,4,252,0,245,0,0
Data 255,110,3,11,0,15,0,0,3,22,4,4,7,0,4,252,0,245,0,0
Data 255,111,3,15,0,7,4,4,7,0,4,252,0,249,252,252,249,0
Data 252,4,0,0,255,112,3,1,0,25,0,0,3,22,4,4,7,0,4,252
Data 0,249,252,252,249,0,252,4,0,0,255,113,18,15,252,252
Data 249,0,252,4,0,7,4,4,7,0,4,252,0,0,18,26,0,231,0,0
Data 255,114,3,11,0,15,0,0,3,22,4,4,7,0,4,252,0,0,255,115
Data 3,15,4,252,7,0,4,4,252,4,248,0,253,3,4,4,7,0,4,252
Data 0,0,255,116,18,15,252,252,252,0,252,4,0,25,0,0,3,26
Data 6,0,0,0,255,117,3,26,0,245,4,252,7,0,4,4,0,0,18,11
Data 0,15,0,0,255,118,3,26,7,241,1,0,7,15,0,0,255,119,3
Data 26,0,245,4,252,4,4,4,252,4,4,0,11,0,0,255,120,3,26
Data 15,241,0,0,3,11,15,15,0,0,255,121,3,5,4,252,7,0,4
Data 4,0,21,0,0,3,26,0,245,4,252,7,0,4,4,0,0,255,122,3
Data 26,15,0,241,241,15,0,0,0,255,129,3,26,0,245,4,252
Data 7,0,4,4,0,0,18,11,0,15,0,0,7,28,0,3,0,0,14,28,0,3
Data 0,0,255,132,3,15,0,7,4,4,7,0,4,252,0,0,18,26,0,241
Data 0,0,18,15,252,252,249,0,252,4,0,0,7,28,0,3,0,0,14
Data 28,0,3,0,0,255,142,3,11,0,25,4,4,7,0,4,252,0,231,0
Data 0,18,26,241,0,0,0,7,43,0,3,0,0,14,43,0,3,0,0,255,148
Data 3,15,0,7,4,4,7,0,4,252,0,24 9,252,252,24 9,0,252,4,0
Data 0,7,28,0,3,0,0,14,28,0,3,0,0,255,153,3,15,0,21,4,4
Data 7,0,4,252,0,235,252,252,249,0,252,4,0,0,7,43,0,3,0
Data 0,14,43,0,3,0,0,255,154,3,40,0,231,4,252,7,0,4,4,0
Data 25,0,0,7,43,0,3,0,0,14,43,0,3,0,0,255,158,3,1,0,35
Data 4,4,7,0,4,252,0,250,252,252,253,0,0,0,14,26,4,252
Data 0,249,252,252,249,0,0,0,255,255,-1

' ****************************************** ' ** ** ' ** DEMO-PROGRAMM ** ' ** (c) MAXON Computer GmbH ** ' ****************************************** @Text_install A$="ST-COMPUTER"+Chr$(0) Xs%=100 Ys%=100 Hidem ' Do X_neu%=Mousex Y_neu%=Mousey If X_neu%<>X% Or Y_neu%<>Y% Or Xs_alt%<>Xs% Or Ys_alt%<>Ys% Or Alpha<>Alpha_alt ' ' TEXT AN ALTER POSITION LÖSCHEN ' @Text_color(0,-1,0) @Text_exec(A$,X%,Y%) ' ' TEXT AN DIE NEUE POSITION SCHREIBEN ' @Text_parameter(Alpha,0,Xs%,Ys%) @Text_color(1,-1,0) @Text_exec(A$,X_neu%,Y_neu%) ' X%=X_neu% Y%=Y_neu% Xs_alt%=Xs% Ys_alt%=Ys% Alpha_alt=Alpha Endif ' If Mousek=1 Add Xs%,7 Add Ys%,7 Xs%=Min(600,Xs%) Ys%=Min(600,Ys%) Else If Mousek=2 Sub Xs%,7 Sub Ys%,7 Xs%=Max(0,Xs%) Ys%=Max(0,Ys%) Endif Endif ' B$=Inkey$ If B$="+" Add Alpha,15/180*Pi Else If B$="-" Sub Alpha,15/180*Pi Endif Endif ' Loop


Links

Copyright-Bestimmungen: siehe Über diese Seite
Classic Computer Magazines
[ Join Now | Ring Hub | Random | << Prev | Next >> ]