                  include BIOS_IF.asm

BUFFER_SIZE       EQU   100
ASCII_CR          EQU   13

                  ORG   APP_START

                  PUTS  HEADER_MSG

                  LD    A, 56H
                  PRINT_HEX

LOOP1             GETC
                  JR    Z, LOOP1

                  CP    ASCII_CR
                  JR    Z, LOOP2

                  PUTC
                  JR    LOOP1

LOOP2             GETS  BUFFER, BUFFER_SIZE

                  LD    A, (BUFFER)
                  CP    0
                  JR    Z, EXIT

                  PUTS  BUFFER
                  JR    LOOP2

EXIT              RET

HEADER_MSG        DB    "Sample App", ASCII_CR, 0
BUFFER            DS    BUFFER_SIZE
