056
05.05.2024, 09:43 Uhr
Bert
|
Zitat: | KCMattze schrieb inwiefern "verdreht"? |
So hier:
Quellcode: | 69 REM Zeile -> Adresse fuer linken Teil 70 JL = INT(Y/2)*512 + B0*64 79 REM Zeile -> Adresse fuer rechten Teil 80 JR = 8192 + B4*1024 + B3*512 + B2*16 + B1*8 + B0*64
|
Beim KC85/4 rechnet man da einfach:
Quellcode: | J = Y*8 + X*256
|
Hier das ganze Programm für Basic im KC85/3:
Quellcode: | 10 REM CLS 20 FOR Y = 0 TO 31:REM Zeilen 29 REM Bits aus Y ermitteln 30 B0 = Y AND 1:B0=SGN(B0) 40 B1 = Y AND 2:B1=SGN(B1) 50 B2 = Y AND 4:B2=SGN(B2) 60 B3 = Y AND 8:B3=SGN(B3) 65 B4 = Y AND 16:B4=SGN(B4) 69 REM Zeile -> Adresse fuer linken Teil 70 JL = INT(Y/2)*512 + B0*64 79 REM Zeile -> Adresse fuer rechten Teil 80 JR = 8192 + B4*1024 + B3*512 + B2*16 + B1*8 + B0*64 89 REM MODULO(8) 90 V = Y AND 7 100 REM PRINT AT(Y,10);B4;B3;B2;B1;B0;:REM debug 110 FOR X = 0 TO 39:REM Spalten 120 I=JL + X 130 IF X>31 THEN I=JR + (X-32) 140 ON V+1 GOSUB 1000,1001,1002,1003,1004,1005,1006,1007 150 NEXT X 160 NEXT Y 998 END 999 REM Auswahl Zeichen 1000 RESTORE 2000:GOTO 1500 1001 RESTORE 2001:GOTO 1500 1002 RESTORE 2002:GOTO 1500 1003 RESTORE 2003:GOTO 1500 1004 RESTORE 2004:GOTO 1500 1005 RESTORE 2005:GOTO 1500 1006 RESTORE 2006:GOTO 1500 1007 RESTORE 2007:GOTO 1500 1499 REM UP Ausgabe (8x8 Pixel) 1500 READ D:VPOKE I,D:I=I+128 1510 READ D:VPOKE I,D:I=I+128 1520 READ D:VPOKE I,D:I=I+128 1530 READ D:VPOKE I,D:I=I-352 1540 READ D:VPOKE I,D:I=I+128 1550 READ D:VPOKE I,D:I=I+128 1560 READ D:VPOKE I,D:I=I+128 1570 READ D:VPOKE I,D:I=I-352 1580 RETURN 1999 REM Musterdefinitionen 2000 DATA 16,16,16,16,16,16,16,16 2001 DATA 8,4,2,1,128,64,32,16 2002 DATA 16,16,16,16,16,16,16,16 2003 DATA 32,64,128,1,2,4,8,16 2004 DATA 32,64,128,1,2,4,8,16 2005 DATA 16,16,16,16,16,16,16,16 2006 DATA 8,4,2,1,128,64,32,16 2007 DATA 8,4,2,1,128,64,32,16
|
Hier das Ergebnis:
Grüße, Bert |