OpenCores
URL https://opencores.org/ocsvn/ssbcc/ssbcc/trunk

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [tb/] [ifdef/] [uc.s] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sinclairrf
; Copyright 2013, Sinclair R.F., Inc.
2
; Test Bench for conditional compilation
3
 
4
.IFDEF I_SCL
5
.main
6
  .ifdef(O_UART_TX) N"I2C Bus included\r\n" .call(uart_tx) .endif
7
  :infinite_1 .jump(infinite_1)
8
.ELSE
9
.main
10
  N"No I2C Bus\r\n" .call(uart_tx)
11
  :infinite_2 .jump(infinite_2)
12
.ENDIF
13
 
14
.function uart_tx
15
  .ifndef(O_UART_TX)
16
    ; Throw away the message.
17
    :loop_1 .jumpc(loop_1) .return
18
  .else
19
    ; Transmit the message bytes as the UART becomes available.
20
    :loop_2 .inport(I_UART_TX_BUSY) .jumpc(loop_2) .outport(O_UART_TX) .jumpc(loop_2,nop) .return(drop)
21
  .endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.