View Single Post
Old 4th Aug 2020, 11:31 am   #114
dominicbeesley
Octode
 
dominicbeesley's Avatar
 
Join Date: Nov 2004
Location: Hebden Bridge, West Yorkshire, UK.
Posts: 1,885
Default Re: SC/MP timing and microcode information

Maybe something like: (not tested just top of my head - I'm no SC/MP expert)

Code:
READBUF:
  LDI #BUF-(STX+1)  ; point at start of buffer in offset byte
LP:
  .. do serial stuff ..
STX:
  ST 0(P0)    ; store
  JZ EXIT  ; terminate on zero received - probably not what you want?
  ILD STX+1  ;increment offset
  XRI #BUFEND-(STX+1)  ; check for end of buffer
  JNZ LP  
EXIT:
  ..exit..

BUF:
  .RES 30
BUFEND:
dominicbeesley is offline