Posted By
spieler on 2021-04-03 07:11:39
| Re: madpascal and plus4 rs232
Hi good afternoon.
with serial sending / receiving, it is easier to direct about the ACIA. There are no open and close.
See demo.
greeting
---------------------------------- // KERNAL_SETLFS = $FFBA; // KERNAL_SETNAM = $FFBD; // KERNAL_OPEN = $FFC0; // KERNAL_CLOSE = $FFC3; // KERNAL_CHKIN = $FFC6; // KERNAL_CHKOUT = $FFC9; // KERNAL_CLRCHN = $FFCC; // KERNAL_CHRIN = $FFCF; // KERNAL_CHROUT = $FFD2; // KERNAL_LOAD = $FFD5; // KERNAL_READST = $FE07;
// ACIA DATA = $fd00; // ACIA STATUS = $fd01; // ACIA COMMAND = $fd02; // ACIA CONTROL = $fd03;
program seriel;
const EMPTY = $20; SCREEN_ADDR = $0c00;
var i,y : byte; procedure seriell_send(); assembler; asm { cli lda #$09 sta $fd02
lda #$1e sta $fd03
lda #66 sta $fd00 }; end;
procedure seriell_empfang(); assembler; asm { cli lda #$09 sta $fd02
lda #$1e sta $fd03
lda $fd00 sta $fc }; end;
begin while True do begin pause(10); seriell_empfang(); poke($c00+i,peek($fc)-96); i:=i+1; if i=80 then begin i:=0; FillChar(pointer(SCREEN_ADDR), 24 * 40, EMPTY); end; end; end. ----------------------------------
|