Line 2... |
Line 2... |
0002 0000 ; tb1.asm -- light8080 core basic demo: 'Hello World!"
|
0002 0000 ; tb1.asm -- light8080 core basic demo: 'Hello World!"
|
0003 0000 ;*******************************************************************************
|
0003 0000 ;*******************************************************************************
|
0004 0000 ; Should be used with SoC vhdl\soc\l80soc.vhdl
|
0004 0000 ; Should be used with SoC vhdl\soc\l80soc.vhdl
|
0005 0000 ; Assembler format compatible with TASM for DOS and Linux.
|
0005 0000 ; Assembler format compatible with TASM for DOS and Linux.
|
0006 0000 ;*******************************************************************************
|
0006 0000 ;*******************************************************************************
|
0007 0000 ; This program will print a Hello message to a 19200/8/N/1 serial port, then
|
0007 0000 ; This program will print a Hello message to a 9600/8/N/1 serial port, then
|
0008 0000 ; will loop forever copying the input port P1 to the output port P2.
|
0008 0000 ; will loop forever copying the input port P1 to the output port P2.
|
0009 0000 ; This demo is meant to be used as a starting point for those wanting to play
|
0009 0000 ; This demo is meant to be used as a starting point for those wanting to play
|
0010 0000 ; with the l80soc core -- which in turn is little more than an usage example
|
0010 0000 ; with the l80soc core -- which in turn is little more than an usage example
|
0011 0000 ; for the light8080 cpu core.
|
0011 0000 ; for the light8080 cpu core.
|
0012 0000 ; See the readme file for instructions for setting up a project with this
|
0012 0000 ; See the readme file for instructions for setting up a project with this
|
Line 63... |
Line 63... |
0063 0063 21 EB 00 lxi h,void_buffer
|
0063 0063 21 EB 00 lxi h,void_buffer
|
0064 0066 22 EC 00 shld ptr_tx
|
0064 0066 22 EC 00 shld ptr_tx
|
0065 0069 21 F0 00 lxi h,rx_buffer
|
0065 0069 21 F0 00 lxi h,rx_buffer
|
0066 006C 22 EE 00 shld ptr_rx
|
0066 006C 22 EE 00 shld ptr_rx
|
0067 006F ; Set up UART baud rate to 9600 bauds @ 50MHz:
|
0067 006F ; Set up UART baud rate to 9600 bauds @ 50MHz:
|
0068 006F ; (50E6 / 16) / 9600 = 325d = 145h
|
0068 006F ; (50E6 / 9600) = 5208d = 1458h
|
0069 006F 3E 14 mvi a,14h ;
|
0069 006F 3E 14 mvi a,14h
|
0070 0071 D3 83 out UART_BAUDH
|
0070 0071 D3 83 out UART_BAUDH
|
0071 0073 3E 58 mvi a,58h
|
0071 0073 3E 58 mvi a,58h
|
0072 0075 D3 82 out UART_BAUDL
|
0072 0075 D3 82 out UART_BAUDL
|
0073 0077
|
0073 0077
|
0074 0077 ; Clear P2 port
|
0074 0077 ; Clear P2 port
|