help with Serial setup

TheKitty:
do you have to use low level code or can you use the Arduino serial library to set the comms, poll the buffer, then get any traffic?

no, i don't have to use lower level code, i just need to take the following code snippet and port it to a DUE:

    if (*txBufPtr)
    {
      if ((UCSRA) & (1 << UDRE))
      {
        UDR = *txBufPtr++;
  
        // we are done with this msg, get the next one
        if (!*txBufPtr)
          nextMessage();
      }
    }