URL
https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk
Subversion Repositories open8_urisc
Compare Revisions
- This comparison shows the changes necessary to convert path
/open8_urisc
- from Rev 301 to Rev 300
- ↔ Reverse comparison
Rev 301 → Rev 300
/trunk/taskmgr/make.bat
File deleted
/trunk/taskmgr/taskmgr_const.s
File deleted
\ No newline at end of file
/trunk/taskmgr/task_1_const.s
File deleted
\ No newline at end of file
/trunk/taskmgr/task_0_const.s
File deleted
\ No newline at end of file
/trunk/taskmgr/app.s
File deleted
\ No newline at end of file
/trunk/taskmgr/taskmgr_config.s
File deleted
\ No newline at end of file
/trunk/taskmgr/sys_version.s
File deleted
\ No newline at end of file
/trunk/taskmgr/APP.HEX
File deleted
/trunk/taskmgr/open8_link.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
trunk/taskmgr/open8_link.exe
Property changes :
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/taskmgr/app.out
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/taskmgr/app.out
===================================================================
--- trunk/taskmgr/app.out (revision 301)
+++ trunk/taskmgr/app.out (nonexistent)
trunk/taskmgr/app.out
Property changes :
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/taskmgr/taskmgr_func.s
===================================================================
--- trunk/taskmgr/taskmgr_func.s (revision 301)
+++ trunk/taskmgr/taskmgr_func.s (nonexistent)
@@ -1,93 +0,0 @@
-; Copyright (c)2022 Jeremy Seth Henry
-; All rights reserved.
-;
-; Redistribution and use in source and binary forms, with or without
-; modification, are permitted provided that the following conditions are met:
-; * Redistributions of source code must retain the above copyright
-; notice, this list of conditions and the following disclaimer.
-; * Redistributions in binary form must reproduce the above copyright
-; notice, this list of conditions and the following disclaimer in the
-; documentation and/or other materials provided with the distribution,
-; where applicable (as part of a user interface, debugging port, etc.)
-;
-; THIS SOFTWARE IS PROVIDED BY JEREMY SETH HENRY ``AS IS'' AND ANY
-; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-; DISCLAIMED. IN NO EVENT SHALL JEREMY SETH HENRY BE LIABLE FOR ANY
-; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;
-;------------------------------------------------------------------------------
-; taskmgr_func.s
-;
-; Program Start, Task Setup, and Core Interrupt Service
-;
-; Note that the CPU must be in supervisory mode for this code to execute
-; properly, which means the I bit MUST be set at startup. This is controlled
-; by HDL generics - specifically the supervisor mode enable.
-;
-; Revision History
-; Author Date Change
-;---------------- -------- ---------------------------------------------------
-; Seth Henry 7/15/22 Initial Release
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; System Bootstrap / Start of ROM
-;------------------------------------------------------------------------------
-.ORG BOOT_BLOCK
-BOOTSTRAP: JMP INIT_MAIN ; Jump past the pointer block
- NOP ; Aligns the data block, but not executed
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Pointer table
-;------------------------------------------------------------------------------
- INSTANCE_TASK_POINTERS
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Task Parameter table
-;------------------------------------------------------------------------------
- INSTANCE_TASK_EXPORTS
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; System start
-;------------------------------------------------------------------------------
-INIT_MAIN: BNI INIT_MAIN ; Trap in a loop if supervisor mode isn't set
- BOOT_SYSTEM
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; RAM Access Fault Shutdown (CALL_PANIC)
-;------------------------------------------------------------------------------
-RAM_FAULT: PROCESS_RAM_FAULT
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Task Switch ISR (CALL_TASK_SW)
-;------------------------------------------------------------------------------
-TASK_SW_INT: SWITCH_TASKS
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; External Interrupt Handler ISR
-;------------------------------------------------------------------------------
-EXT_INT_MGR:
-.IFDEF INTMGR16
- CHECK_EXTERNAL_IO_INTS16
-.ELSE
- CHECK_EXTERNAL_IO_INTS
-.ENDIF
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; ISR Context Function Calls (CALL_SUPV_FN)
-;------------------------------------------------------------------------------
- INSTANCE_SUPV_FUNCS
-;------------------------------------------------------------------------------
Index: trunk/taskmgr/open8_as.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/taskmgr/open8_as.exe
===================================================================
--- trunk/taskmgr/open8_as.exe (revision 301)
+++ trunk/taskmgr/open8_as.exe (nonexistent)
trunk/taskmgr/open8_as.exe
Property changes :
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property
Index: trunk/taskmgr/task_1_func.s
===================================================================
--- trunk/taskmgr/task_1_func.s (revision 301)
+++ trunk/taskmgr/task_1_func.s (nonexistent)
@@ -1,51 +0,0 @@
-; Copyright (c)2022 Jeremy Seth Henry
-; All rights reserved.
-;
-; Redistribution and use in source and binary forms, with or without
-; modification, are permitted provided that the following conditions are met:
-; * Redistributions of source code must retain the above copyright
-; notice, this list of conditions and the following disclaimer.
-; * Redistributions in binary form must reproduce the above copyright
-; notice, this list of conditions and the following disclaimer in the
-; documentation and/or other materials provided with the distribution,
-; where applicable (as part of a user interface, debugging port, etc.)
-;
-; THIS SOFTWARE IS PROVIDED BY JEREMY SETH HENRY ``AS IS'' AND ANY
-; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-; DISCLAIMED. IN NO EVENT SHALL JEREMY SETH HENRY BE LIABLE FOR ANY
-; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;
-;------------------------------------------------------------------------------
-; task_1_func.s
-;
-; Revision History
-; Author Date Change
-;---------------- -------- ---------------------------------------------------
-; Seth Henry 7/15/22 Initial Release
-;------------------------------------------------------------------------------
-.ORG TASK1_BLOCK
-
-;------------------------------------------------------------------------------
-; Pointer table
-;------------------------------------------------------------------------------
- INSTANCE_TASK1_POINTERS
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Task Initialization
-;------------------------------------------------------------------------------
-TASK1_INIT: INITIALIZE_TASK1_VARS
- RTS
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Task Executive
-;------------------------------------------------------------------------------
-TASK1_EXEC: RTS
-;------------------------------------------------------------------------------
\ No newline at end of file
Index: trunk/taskmgr/task_0_func.s
===================================================================
--- trunk/taskmgr/task_0_func.s (revision 301)
+++ trunk/taskmgr/task_0_func.s (nonexistent)
@@ -1,51 +0,0 @@
-; Copyright (c)2022 Jeremy Seth Henry
-; All rights reserved.
-;
-; Redistribution and use in source and binary forms, with or without
-; modification, are permitted provided that the following conditions are met:
-; * Redistributions of source code must retain the above copyright
-; notice, this list of conditions and the following disclaimer.
-; * Redistributions in binary form must reproduce the above copyright
-; notice, this list of conditions and the following disclaimer in the
-; documentation and/or other materials provided with the distribution,
-; where applicable (as part of a user interface, debugging port, etc.)
-;
-; THIS SOFTWARE IS PROVIDED BY JEREMY SETH HENRY ``AS IS'' AND ANY
-; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-; DISCLAIMED. IN NO EVENT SHALL JEREMY SETH HENRY BE LIABLE FOR ANY
-; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;
-;------------------------------------------------------------------------------
-; task_0_func.s
-;
-; Revision History
-; Author Date Change
-;---------------- -------- ---------------------------------------------------
-; Seth Henry 7/15/22 Initial Release
-;------------------------------------------------------------------------------
-.ORG TASK0_BLOCK
-
-;------------------------------------------------------------------------------
-; Pointer table
-;------------------------------------------------------------------------------
- INSTANCE_TASK0_POINTERS
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Task Initialization
-;------------------------------------------------------------------------------
-TASK0_INIT: INITIALIZE_TASK0_VARS
- RTS
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Task Executive
-;------------------------------------------------------------------------------
-TASK0_EXEC: RTS
-;------------------------------------------------------------------------------
\ No newline at end of file
Index: trunk/taskmgr/sys_hw_map.s
===================================================================
--- trunk/taskmgr/sys_hw_map.s (revision 301)
+++ trunk/taskmgr/sys_hw_map.s (nonexistent)
@@ -1,73 +0,0 @@
-; Copyright (c)2022 Jeremy Seth Henry
-; All rights reserved.
-;
-; Redistribution and use in source and binary forms, with or without
-; modification, are permitted provided that the following conditions are met:
-; * Redistributions of source code must retain the above copyright
-; notice, this list of conditions and the following disclaimer.
-; * Redistributions in binary form must reproduce the above copyright
-; notice, this list of conditions and the following disclaimer in the
-; documentation and/or other materials provided with the distribution,
-; where applicable (as part of a user interface, debugging port, etc.)
-;
-; THIS SOFTWARE IS PROVIDED BY JEREMY SETH HENRY ``AS IS'' AND ANY
-; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-; DISCLAIMED. IN NO EVENT SHALL JEREMY SETH HENRY BE LIABLE FOR ANY
-; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;
-;------------------------------------------------------------------------------
-; sys_hw_map.s
-;
-; Defines the interface between HDL and assembly, and should be derived from
-; Open8_cfg.vhd (this is a minimal configuration)
-;
-; Revision History
-; Author Date Change
-;---------------- -------- ---------------------------------------------------
-; Seth Henry 7/15/22 Initial Release
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; System Memory Map from Open8_cfg
-;------------------------------------------------------------------------------
-.DEFINE RAM_Address $0000 ; System RAM
-.DEFINE WPR_Address $1000 ; RAM Write Protect Mask
-.DEFINE WQL_Address $1020 ; I/O Write Qual Register
-.DEFINE INT_Address $1040 ; Cascaded Interrupt Manager
-;...
-.DEFINE ROM_Address $8000 ; Application ROM
-.DEFINE ISR_Start_Addr $FFF0 ; ISR vector table
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Interrupt Manager Selection
-;
-; Uncomment the INTMGR16 define if using the 16-bit "complex" interrupt manager
-; firmware. Otherwise, the 8-bit "simple" external interrupt manager is
-; assumed. Note that the interfaces are NOT register compatible, so this will
-; break the system if the wrong manager is selected!
-;
-;.DEFINE INTMGR16
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; RAM Configuration
-;------------------------------------------------------------------------------
-; Define the size of the memory and number of partitions in order to configure
-; the region size constant - which will be used by tasks to assign their
-; write-protection requirements
-.DEFINE RAM_Size 4096
-.DEFINE RAM_Partitions 32
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Write Qualification Groups from Open8_cfg
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
\ No newline at end of file
Index: trunk/taskmgr/sys_const.s
===================================================================
--- trunk/taskmgr/sys_const.s (revision 301)
+++ trunk/taskmgr/sys_const.s (nonexistent)
@@ -1,323 +0,0 @@
-; Copyright (c)2022 Jeremy Seth Henry
-; All rights reserved.
-;
-; Redistribution and use in source and binary forms, with or without
-; modification, are permitted provided that the following conditions are met:
-; * Redistributions of source code must retain the above copyright
-; notice, this list of conditions and the following disclaimer.
-; * Redistributions in binary form must reproduce the above copyright
-; notice, this list of conditions and the following disclaimer in the
-; documentation and/or other materials provided with the distribution,
-; where applicable (as part of a user interface, debugging port, etc.)
-;
-; THIS SOFTWARE IS PROVIDED BY JEREMY SETH HENRY ``AS IS'' AND ANY
-; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-; DISCLAIMED. IN NO EVENT SHALL JEREMY SETH HENRY BE LIABLE FOR ANY
-; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-; THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-;
-;------------------------------------------------------------------------------
-; sys_const.s
-;
-; Common constants & macros for generic hardware or structures used by several
-; tasks
-;
-; Revision History
-; Author Date Change
-;---------------- -------- ---------------------------------------------------
-; Seth Henry 7/15/22 Initial Release
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-;-- Serial Port Constants & Macros
-;------------------------------------------------------------------------------
-.DEFINE UART_DATA 0
-.DEFINE UART_STATUS 1
-
-.DEFINE UART_RX_PERR 3
-.DEFINE UART_RX_EMPTY 4
-.DEFINE UART_RX_FULL 5
-.DEFINE UART_TX_EMPTY 6
-.DEFINE UART_TX_FULL 7
-
-.DEFINE UART_RX_PERR_BIT 2^UART_RX_PERR
-.DEFINE UART_RX_PERR_MASK UART_RX_PERR_BIT ~ $FF
-
-.DEFINE UART_RX_EMPTY_BIT 2^UART_RX_EMPTY
-.DEFINE UART_RX_EMPTY_MASK UART_RX_EMPTY_BIT ~ $FF
-
-.DEFINE UART_RX_FULL_BIT 2^UART_RX_FULL
-.DEFINE UART_RX_FULL_MASK UART_RX_FULL_BIT ~ $FF
-
-.DEFINE UART_TX_EMPTY_BIT 2^UART_TX_EMPTY
-.DEFINE UART_TX_EMPTY_MASK UART_TX_EMPTY_BIT ~ $FF
-
-.DEFINE UART_TX_FULL_BIT 2^UART_TX_FULL
-.DEFINE UART_TX_FULL_MASK UART_TX_FULL_BIT ~ $FF
-
-; Checking the UART flags involves testing bits in the status register
-; The assembler isn't bright enough to use the defined constant, so this macro
-; does the test on the correct bit
-
-.MACRO CHECK_UART_RX_PERR
- BTT 3
-.ENDM
-
-.MACRO CHECK_UART_RX_EMPTY
- BTT 4
-.ENDM
-
-.MACRO CHECK_UART_RX_FULL
- BTT 5
-.ENDM
-
-.MACRO CHECK_UART_TX_EMPTY
- BTT 6
-.ENDM
-
-.MACRO CHECK_UART_TX_FULL
- BTT 7
-.ENDM
-
-; Register Map:
-; Offset Bitfield Description Read/Write
-; 0x00 AAAAAAAA TX Data (WR) RX Data (RD) (RW)
-; 0x01 EDCBA--- FIFO Status (RO*)
-; A: RX Parity Error (write to clear)
-; B: RX FIFO Empty
-; C: RX FIFO almost full (922/1024)
-; D: TX FIFO Empty
-; E: TX FIFO almost full (922/1024)
-;
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Macros for setting the return value in Cmd_Error
-;------------------------------------------------------------------------------
-.DEFINE RX_CERR $FB
-.DEFINE RX_TERR $FC
-.DEFINE RX_LERR $FD
-.DEFINE RX_PERR $FE
-.DEFINE RX_OKAY $FF
-
-.MACRO RETURN_RX_CMD_OKAY
- LDI R0, #RX_OKAY
-.ENDM
-
-.MACRO RETURN_RX_CMD_ERROR
- LDI R0, #RX_CERR
-.ENDM
-
-.MACRO RETURN_RX_TIMEOUT_ERROR
- LDI R0, #RX_TERR
-.ENDM
-
-.MACRO RETURN_RX_LENGTH_ERROR
- LDI R0, #RX_LERR
-.ENDM
-
-.MACRO RETURN_RX_PARITY_ERROR
- LDI R0, #RX_PERR
-.ENDM
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Common buffer/memory copy
-; Uses R3:R2 as source, R5:R4 as destination, and R1 as the counter variable
-;------------------------------------------------------------------------------
-.MACRO MEM_COPY
-__MEM_CP_LP\@:LDX R2++
- STX R4++
- DBNZ R1, __MEM_CP_LP\@
-.ENDM
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Common buffer/memory fill/flush
-; Uses R5:R4 as destination, and R1 as the counter variable
-;------------------------------------------------------------------------------
-.MACRO MEM_FILL
-__MEM_FL_LP\@:STX R4++
- DBNZ R1, __MEM_FL_LP\@
-.ENDM
-
-.MACRO MEM_FLUSH
- CLR R0
- MEM_FILL
-.ENDM
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Compute 16-bit Checksum
-;
-; Uses R3:R2 as source, R5:R4 as destination, and R1 as the counter variable
-; Adds all of the memory locations specified to a 16-bit accumulator, returning
-; the result in R5:R4 (destination)
-;------------------------------------------------------------------------------
-.MACRO CALC_CHECKSUM16
- CLR R0
- T0X R4 ; Initialize accumulator R5:R0 to 0
- T0X R5
- T0X R7 ; Initialize R7 to 0
-
-__CHK_SM_LP\@:LDX R2++
- ADD R4
- T0X R4
-
- TX0 R5
- ADC R7
- T0X R5
-
- DBNZ R1, __CHK_SM_LP\@
-.ENDM
-
-; These macros assume that the pointer in R3:R2 has been left pointing to the
-; end of the receive buffer by the CALC_CHECKSUM16 macro. Do NOT repoint
-; R3:R2, and be sure to use these macros in the order that the checksum bytes
-; appear in the packet. (THESE ARE ORDER DEPENDENT)
-
-.MACRO CHECK_SUM_LB
- LDX R2++
- XOR R4
-.ENDM
-
-.MACRO CHECK_SUM_UB
- LDX R2++
- XOR R5
-.ENDM
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Convert ASCII to HEX
-;
-; Converts an ASCII value into an integer value from 0x0 to 0xF
-; Assumes incoming data is in R0. Returns a value in R0
-; Returns a value of 0x00 to 0x0F for valid characters, or
-; 0xFF (-1) for invalid characters
-;------------------------------------------------------------------------------
-.MACRO CONVERT_ASC2HEX
- PSH R1 ; Preserve R1 and R2
- PSH R2
-
- T0X R2 ; Make a copy of R0 to R2 for backup
- LDI R1, #$F0 ; Mask off the lower bits to figure out the range
- AND R1
- T0X R1 ; Copy the upper 4-bits to R1 for branching tests
-
- LDI R0, #$30 ; Is it a decimal char 0-9?
- XOR R1
- BRZ _CNV_AH_09_\@
-
- LDI R0, #$40 ; Is it a hex char A-F?
- XOR R1
- BRZ _CNV_AH_AF_\@
-
- LDI R0, #$60 ; Is it a hex char a-f?
- XOR R1
- BRZ _CNV_AH_AF_\@
-
- BNI _CNV_AH_NV_\@
-
-; Valid HEX characters 0-9 are ASCII codes 0x30 to 0x39. Codes 0x3A to 0x3F are
-; invalid, so check that the value in R0 is LESS than $3A.
-_CNV_AH_09_\@:TX0 R2 ; Restore R0 from backup
- LDI R1, #$0F ; Mask off the upper bits to check validity
- AND R1
- T0X R2 ; Backup the lower 4-bits to R2
-
-; Check for 0x0A to 0x0F
- LDI R1, #$0A ; Load R1 with 0x0A (:)
- CMP R1 ; Compare R0 to R1
- BNN _CNV_AH_NV_\@ ; Branch if not negative (R0 > 9)
-
- TX0 R2 ; Restore the lower 4-bits to R0
- BNI _CNV_AH_EX_\@
-
-; Valid HEX characters A-F are 0x41 to 0x46 OR 0x61 to $66. The upper 4-bits
-; have already been checked, so just verify that the lower 4-bits are between
-; 0x01 and 0x06. 0x00 and 0x07 to 0x0F are invalid,
-; so check that the value in R0 is LESS than $3A
-_CNV_AH_AF_\@:TX0 R2 ; Restore R0 from backup
- LDI R1, #$0F ; Mask off the upper bits to check validity
- AND R1
- T0X R2 ; Backup the lower 4-bits to R2
-
-; Check for 0x00
- BRZ _CNV_AH_NV_\@ ; 0x0 is an invalid code
-
-; Check for 0x07 to 0x0F
- LDI R1, #$07 ; Load R1 with 0x7 (G or g)
- CMP R1 ; Compare R0 to R1
- BNN _CNV_AH_NV_\@ ; Branch of not negative (R0 > 6)
-
-; If this is a valid character, add 9 to the lower 4-bits for the result
-; (0x01 to 0x06 -> 0x0A to 0x0F)
- TX0 R2 ; Restore lower 4-bits to R0
- LDI R1, #$09 ; Load R1 with 0x9
- ADD R1 ; Added 9 to R0 to convert to A-F
- BNI _CNV_AH_EX_\@
-
-_CNV_AH_NV_\@:LDI R0, #$FF ; Return 0xFF on an invalid character
-
-_CNV_AH_EX_\@:POP R2 ; Restore R1 and R2
- POP R1
-.ENDM
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Convert the lower nibble of R0 into a valid ASCII character
-; Accepts data in R0 and returns the ASCII code in R0
-;------------------------------------------------------------------------------
-.MACRO CONVERT_NIB2ASC
- PSH R1 ; Preserve R1
-
- LDI R1, #$0F ; Mask away the upper 4-bits
- AND R1
-
- T0X R1 ; Copy to R1
- LDI R0, #$09 ; Load R0 with 0x09
- CMP R1 ; Compare R0 to R1
- BNN _CNV_NA_09_\@
- ; Fall into _MC_FM_CHA_AF
-
-_CNV_NA_AF_\@:LDI R0, #$37 ; Add 0x37 to the nibble to get the ASCII value
- ADD R1
- BNI _CNV_NA_EX_\@
-
-_CNV_NA_09_\@:LDI R0, #$30 ; Add 0x30 to the nibble to get the ASCII value
- OR R1
- ; Fall into _MC_FM_CHA_EX
-
-_CNV_NA_EX_\@:POP R1
-.ENDM
-;------------------------------------------------------------------------------
-
-;------------------------------------------------------------------------------
-; Convert the packed BCD value in R0 to its ASCII equivalent in R3:R2
-; $59 -> $35, $39
-;------------------------------------------------------------------------------
-.MACRO CONV_PBCD_TO_ASCII
- T0X R2 ; Copy R0 -> R2 for re-use
- LDI R0, #$F0 ; Set the upper nibble mask. BCD is only 3-bit
- AND R2 ; Mask off the upper 3-bits of value -> R0
- CLP PSR_C ; Clear the carry (in case CPU options not set)
- ROR R0 ; Shift the upper nibble down
- ROR R0
- ROR R0
- ROR R0
- LDI R1, #$30 ; Set the ASCII upper nibble mask of $30
- OR R1 ; Create an ASCII character
- T0X R3 ; Transfer the upper character to R3
-
- LDI R0, #$0F ; Set the lower nibble mask
- AND R2 ; Mask off the lower bits
- OR R1 ; Create an ASCII character
- T0X R2 ; Store the lower character to R1
- RTS
-.ENDM
-;------------------------------------------------------------------------------
Index: trunk/taskmgr/mk_app
===================================================================
--- trunk/taskmgr/mk_app (revision 301)
+++ trunk/taskmgr/mk_app (nonexistent)
@@ -1,2 +0,0 @@
-[objects]
-app.obj
\ No newline at end of file
Index: trunk/taskmgr/srec_cat.exe
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: trunk/taskmgr/srec_cat.exe
===================================================================
--- trunk/taskmgr/srec_cat.exe (revision 301)
+++ trunk/taskmgr/srec_cat.exe (nonexistent)
trunk/taskmgr/srec_cat.exe
Property changes :
Deleted: svn:mime-type
## -1 +0,0 ##
-application/octet-stream
\ No newline at end of property