ls_test.rmh

来自「和picoblaze完全兼容的mcu ip core」· RMH 代码 · 共 1,595 行 · 第 1/5 页

RMH
1,595
字号
30289 // @06c #411: CALL(send_OK)3401b // @06d #412: JUMP(warm_start)// #413: ;// #414: ;Processing potential 'AUTO' command// #415: ;// @06e #416: [AUTO_command]30112 // @06e #416: CALL(read_next_char)14055 // @06f #417: COMPARE(s0,character_U) ;test for 'U' of 'AUTO' command35432 // @070 #418: JUMP(NZ,bad_command)30112 // @071 #419: CALL(read_next_char)14054 // @072 #420: COMPARE(s0,character_T) ;test for 'T' of 'AUTO' command35432 // @073 #421: JUMP(NZ,bad_command)30112 // @074 #422: CALL(read_next_char)1404f // @075 #423: COMPARE(s0,character_O) ;test for 'O' of 'AUTO' command35432 // @076 #424: JUMP(NZ,bad_command)30112 // @077 #425: CALL(read_next_char) ;test for a space14020 // @078 #426: COMPARE(s0,character_space)35432 // @079 #427: JUMP(NZ,bad_command)30112 // @07a #428: CALL(read_next_char)1404f // @07b #429: COMPARE(s0,character_O) ;test for 'O' of 'ON' or 'OFF'35432 // @07c #430: JUMP(NZ,bad_command)30112 // @07d #431: CALL(read_next_char)1404e // @07e #432: COMPARE(s0,character_N) ;test for 'N' of 'ON'3508a // @07f #433: JUMP(Z,test_auto_ON)14046 // @080 #434: COMPARE(s0,character_F) ;test for 'F' of 'OFF'35432 // @081 #435: JUMP(NZ,bad_command)30112 // @082 #436: CALL(read_next_char)14046 // @083 #437: COMPARE(s0,character_F) ;test for 'F' of 'OFF'35432 // @084 #438: JUMP(NZ,bad_command)30112 // @085 #439: CALL(read_next_char)1400d // @086 #440: COMPARE(s0,character_CR) ;test for carriage return35432 // @087 #441: JUMP(NZ,bad_command)00000 // @088 #442: LOAD(s0,0) ;turn off auto increment3408e // @089 #443: JUMP(update_auto)// @08a #444: [test_auto_ON]30112 // @08a #444: CALL(read_next_char)1400d // @08b #445: COMPARE(s0,character_CR) ;test for carriage return35432 // @08c #446: JUMP(NZ,bad_command)00001 // @08d #447: LOAD(s0,1) ;turn on auto increment// @08e #448: [update_auto]2e00c // @08e #448: STORE(s0,auto_inc)30289 // @08f #449: CALL(send_OK)3401b // @090 #450: JUMP(warm_start)// #451: ;// #452: ;Processing potential 'FAST' command// #453: ;// @091 #454: [FAST_command]30112 // @091 #454: CALL(read_next_char)14041 // @092 #455: COMPARE(s0,character_A) ;test for 'A' of 'FAST' command35432 // @093 #456: JUMP(NZ,bad_command)30112 // @094 #457: CALL(read_next_char)14053 // @095 #458: COMPARE(s0,character_S) ;test for 'S' of 'FAST' command35432 // @096 #459: JUMP(NZ,bad_command)30112 // @097 #460: CALL(read_next_char)14054 // @098 #461: COMPARE(s0,character_T) ;test for 'T' of 'FAST' command35432 // @099 #462: JUMP(NZ,bad_command)30112 // @09a #463: CALL(read_next_char) ;test for a space14020 // @09b #464: COMPARE(s0,character_space)35432 // @09c #465: JUMP(NZ,bad_command)30112 // @09d #466: CALL(read_next_char)1404f // @09e #467: COMPARE(s0,character_O) ;test for 'O' of 'ON' or 'OFF'35432 // @09f #468: JUMP(NZ,bad_command)30112 // @0a0 #469: CALL(read_next_char)1404e // @0a1 #470: COMPARE(s0,character_N) ;test for 'N' of 'ON'350ad // @0a2 #471: JUMP(Z,test_fast_ON)14046 // @0a3 #472: COMPARE(s0,character_F) ;test for 'F' of 'OFF'35432 // @0a4 #473: JUMP(NZ,bad_command)30112 // @0a5 #474: CALL(read_next_char)14046 // @0a6 #475: COMPARE(s0,character_F) ;test for 'F' of 'OFF'35432 // @0a7 #476: JUMP(NZ,bad_command)30112 // @0a8 #477: CALL(read_next_char)1400d // @0a9 #478: COMPARE(s0,character_CR) ;test for carriage return35432 // @0aa #479: JUMP(NZ,bad_command)00000 // @0ab #480: LOAD(s0,0) ;turn off fast mode340b1 // @0ac #481: JUMP(update_fast)// @0ad #482: [test_fast_ON]30112 // @0ad #482: CALL(read_next_char)1400d // @0ae #483: COMPARE(s0,character_CR) ;test for carriage return35432 // @0af #484: JUMP(NZ,bad_command)00001 // @0b0 #485: LOAD(s0,1) ;turn on fast mode// @0b1 #486: [update_fast]2e00d // @0b1 #486: STORE(s0,fast_mode)30289 // @0b2 #487: CALL(send_OK)3401b // @0b3 #488: JUMP(warm_start)// #489: ;// #490: ;Processing potential 'CYCLE' command// #491: ;// @0b4 #492: [CYCLE_command]30112 // @0b4 #492: CALL(read_next_char)14059 // @0b5 #493: COMPARE(s0,character_Y) ;test for 'Y' of 'CYCLE' command35432 // @0b6 #494: JUMP(NZ,bad_command)30112 // @0b7 #495: CALL(read_next_char)14043 // @0b8 #496: COMPARE(s0,character_C) ;test for 'C' of 'CYCLE' command35432 // @0b9 #497: JUMP(NZ,bad_command)30112 // @0ba #498: CALL(read_next_char)1404c // @0bb #499: COMPARE(s0,character_L) ;test for 'L' of 'CYCLE' command35432 // @0bc #500: JUMP(NZ,bad_command)30112 // @0bd #501: CALL(read_next_char)14045 // @0be #502: COMPARE(s0,character_E) ;test for 'E' of 'CYCLE' command35432 // @0bf #503: JUMP(NZ,bad_command)30112 // @0c0 #504: CALL(read_next_char) ;test for a space14020 // @0c1 #505: COMPARE(s0,character_space)35432 // @0c2 #506: JUMP(NZ,bad_command)30112 // @0c3 #507: CALL(read_next_char) ;determine decimal value of 'n' in [s9,s8,s7,s6]1400d // @0c4 #508: COMPARE(s0,character_CR)35032 // @0c5 #509: JUMP(Z,bad_command) ;need at least 1 digit301fe // @0c6 #510: CALL(ASCII_to_decimal) ;convert to decimal and test35832 // @0c7 #511: JUMP(C,bad_command)01600 // @0c8 #512: LOAD(s6,s0)00700 // @0c9 #513: LOAD(s7,0)00800 // @0ca #514: LOAD(s8,0)00900 // @0cb #515: LOAD(s9,0)30112 // @0cc #516: CALL(read_next_char)1400d // @0cd #517: COMPARE(s0,character_CR)350e7 // @0ce #518: JUMP(Z,store_n)301fe // @0cf #519: CALL(ASCII_to_decimal)35832 // @0d0 #520: JUMP(C,bad_command)01760 // @0d1 #521: LOAD(s7,s6)01600 // @0d2 #522: LOAD(s6,s0)30112 // @0d3 #523: CALL(read_next_char)1400d // @0d4 #524: COMPARE(s0,character_CR)350e7 // @0d5 #525: JUMP(Z,store_n)301fe // @0d6 #526: CALL(ASCII_to_decimal)35832 // @0d7 #527: JUMP(C,bad_command)01870 // @0d8 #528: LOAD(s8,s7)01760 // @0d9 #529: LOAD(s7,s6)01600 // @0da #530: LOAD(s6,s0)30112 // @0db #531: CALL(read_next_char)1400d // @0dc #532: COMPARE(s0,character_CR)350e7 // @0dd #533: JUMP(Z,store_n)301fe // @0de #534: CALL(ASCII_to_decimal)35832 // @0df #535: JUMP(C,bad_command)01980 // @0e0 #536: LOAD(s9,s8)01870 // @0e1 #537: LOAD(s8,s7)01760 // @0e2 #538: LOAD(s7,s6)01600 // @0e3 #539: LOAD(s6,s0)30112 // @0e4 #540: CALL(read_next_char)1400d // @0e5 #541: COMPARE(s0,character_CR)35432 // @0e6 #542: JUMP(NZ,bad_command) ;only 4 digits supported so must be a CR next// @0e7 #543: [store_n]2e608 // @0e7 #543: STORE(s6,n_count0) ;store value of 'n'2e709 // @0e8 #544: STORE(s7,n_count1)2e80a // @0e9 #545: STORE(s8,n_count2)2e90b // @0ea #546: STORE(s9,n_count3)3021d // @0eb #547: CALL(send_CR)// @0ec #548: [n_loop]06608 // @0ec #548: FETCH(s6,n_count0) ;Execute cycle command 'n' times06709 // @0ed #549: FETCH(s7,n_count1)0680a // @0ee #550: FETCH(s8,n_count2)0690b // @0ef #551: FETCH(s9,n_count3)1c601 // @0f0 #552: SUB(s6,1) ;decrement counter35cfc // @0f1 #553: JUMP(NC,update_n)00609 // @0f2 #554: LOAD(s6,9)1c701 // @0f3 #555: SUB(s7,1)35cfc // @0f4 #556: JUMP(NC,update_n)00709 // @0f5 #557: LOAD(s7,9)1c801 // @0f6 #558: SUB(s8,1)35cfc // @0f7 #559: JUMP(NC,update_n)00809 // @0f8 #560: LOAD(s8,9)1c901 // @0f9 #561: SUB(s9,1)35cfc // @0fa #562: JUMP(NC,update_n)3410f // @0fb #563: JUMP(end_cycle) ;roll under to 9999 signifies end of command// @0fc #564: [update_n]2e608 // @0fc #564: STORE(s6,n_count0) ;updated stored value of 'n'2e709 // @0fd #565: STORE(s7,n_count1)2e80a // @0fe #566: STORE(s8,n_count2)2e90b // @0ff #567: STORE(s9,n_count3)06e0d // @100 #568: FETCH(sE,fast_mode) ;determine display mode14e00 // @101 #569: COMPARE(sE,0) ;display active if fast mode is off3510d // @102 #570: JUMP(Z,step_test)00e01 // @103 #571: LOAD(sE,1) ;turn display off for fast mode on14600 // @104 #572: COMPARE(s6,0) ;but display last line of cycle command3550d // @105 #573: JUMP(NZ,step_test)14700 // @106 #574: COMPARE(s7,0)3550d // @107 #575: JUMP(NZ,step_test)14800 // @108 #576: COMPARE(s8,0)3550d // @109 #577: JUMP(NZ,step_test)14900 // @10a #578: COMPARE(s9,0)3550d // @10b #579: JUMP(NZ,step_test)00e00 // @10c #580: LOAD(sE,0)// @10d #581: [step_test]30115 // @10d #581: CALL(step_line_store) ;execute one test step of the line store340ec // @10e #582: JUMP(n_loop)// @10f #583: [end_cycle]30290 // @10f #583: CALL(send_index) ;display index card for data30289 // @110 #584: CALL(send_OK)3401b // @111 #585: JUMP(warm_start)// #586: ;// #587: ;// #588: ;Read next character from scratch pad memory// #589: ;// @112 #590: [read_next_char]18e01 // @112 #590: ADD(sE,1)070e0 // @113 #591: FETCH(s0,sE) ;test for space2a000 // @114 #592: RETURN// #593: ;// #594: ;// #595: ;// #596: ;**************************************************************************************// #597: ; Line Store step// #598: ;**************************************************************************************// #599: ;// #600: ; Performs one step of the line stores in which the following sequence is followed.// #601: ;// #602: ; 1) The cycle counter is incremented and then displayed.// #603: ; 2) Display the value about to be stored.// #604: ; 3) The current output from each line store is read and displayed.// #605: ;       This is representative of the value which would be captured on the next rising clock.// #606: ; 4) The clock enable to the line stores is activated storing the value held in the// #607: ;       line_store_input register.// #608: ; 5) Increment the value to be stored next time if function has been turned on.// #609: ;// #610: ; The display output is suppressed when register 'sE' is not zero.// #611: ;// #612: ;// @115 #613: [step_line_store]06904 // @115 #613: FETCH(s9,step_counter4) ;increment step counter06803 // @116 #614: FETCH(s8,step_counter3)06702 // @117 #615: FETCH(s7,step_counter2)06601 // @118 #616: FETCH(s6,step_counter1)06500 // @119 #617: FETCH(s5,step_counter0)18501 // @11a #618: ADD(s5,1)1450a // @11b #619: COMPARE(s5,10)3552e // @11c #620: JUMP(NZ,store_step_count)00500 // @11d #621: LOAD(s5,0)18601 // @11e #622: ADD(s6,1)1460a // @11f #623: COMPARE(s6,10)3552e // @120 #624: JUMP(NZ,store_step_count)00600 // @121 #625: LOAD(s6,0)18701 // @122 #626: ADD(s7,1)1470a // @123 #627: COMPARE(s7,10)3552e // @124 #628: JUMP(NZ,store_step_count)00700 // @125 #629: LOAD(s7,0)18801 // @126 #630: ADD(s8,1)1480a // @127 #631: COMPARE(s8,10)3552e // @128 #632: JUMP(NZ,store_step_count)00800 // @129 #633: LOAD(s8,0)18901 // @12a #634: ADD(s9,1)1490a // @12b #635: COMPARE(s9,10)3552e // @12c #636: JUMP(NZ,store_step_count)00900 // @12d #637: LOAD(s9,0)// @12e #638: [store_step_count]2e904 // @12e #638: STORE(s9,step_counter4)2e803 // @12f #639: STORE(s8,step_counter3)2e702 // @130 #640: STORE(s7,step_counter2)2e601 // @131 #641: STORE(s6,step_counter1)2e500 // @132 #642: STORE(s5,step_counter0)14e00 // @133 #643: COMPARE(sE,0) ;suppress display35599 // @134 #644: JUMP(NZ,skip_display)01f90 // @135 #645: LOAD(UART_data,s9) ;display step counter18f30 // @136 #646: ADD(UART_data,48)301ab // @137 #647: CALL(send_to_UART)01f80 // @138 #648: LOAD(UART_data,s8)18f30 // @139 #649: ADD(UART_data,48)301ab // @13a #650: CALL(send_to_UART)01f70 // @13b #651: LOAD(UART_data,s7)18f30 // @13c #652: ADD(UART_data,48)301ab // @13d #653: CALL(send_to_UART)01f60 // @13e #654: LOAD(UART_data,s6)18f30 // @13f #655: ADD(UART_data,48)301ab // @140 #656: CALL(send_to_UART)01f50 // @141 #657: LOAD(UART_data,s5)18f30 // @142 #658: ADD(UART_data,48)301ab // @143 #659: CALL(send_to_UART)30220 // @144 #660: CALL(send_space)30220 // @145 #661: CALL(send_space)30220 // @146 #662: CALL(send_space)06a05 // @147 #663: FETCH(sA,test_data_in0) ;Read set value into [sC,sB,sA]06b06 // @148 #664: FETCH(sB,test_data_in1)06c07 // @149 #665: FETCH(sC,test_data_in2)0600c // @14a #666: FETCH(s0,auto_inc)010c0 // @14b #667: LOAD(s0,sC) ;display value being input to line store30213 // @14c #668: CALL(send_hex_byte)010b0 // @14d #669: LOAD(s0,sB)30213 // @14e #670: CALL(send_hex_byte)010a0 // @14f #671: LOAD(s0,sA)30213 // @150 #672: CALL(send_hex_byte)30220 // @151 #673: CALL(send_space)30220 // @152 #674: CALL(send_space)04004 // @153 #675: INPUT(s0,line_store1_output_H) ;read 24-bit line store 1 output and display30213 // @154 #676: CALL(send_hex_byte)04003 // @155 #677: INPUT(s0,line_store1_output_M)30213 // @156 #678: CALL(send_hex_byte)04002 // @157 #679: INPUT(s0,line_store1_output_L)30213 // @158 #680: CALL(send_hex_byte)30220 // @159 #681: CALL(send_space)30220 // @15a #682: CALL(send_space)04007 // @15b #683: INPUT(s0,line_store2_output_H) ;read 18-bit line store 2 output and display30219 // @15c #684: CALL(send_nibble)04006 // @15d #685: INPUT(s0,line_store2_output_M)30213 // @15e #686: CALL(send_hex_byte)04005 // @15f #687: INPUT(s0,line_store2_output_L)30213 // @160 #688: CALL(send_hex_byte)30220 // @161 #689: CALL(send_space)30220 // @162 #690: CALL(send_space)04009 // @163 #691: INPUT(s0,line_store3_output_H) ;read 13-bit line store 3 output and display30213 // @164 #692: CALL(send_hex_byte)04008 // @165 #693: INPUT(s0,line_store3_output_L)30213 // @166 #694: CALL(send_hex_byte)30220 // @167 #695: CALL(send_space)30220 // @168 #696: CALL(send_space)0400c // @169 #697: INPUT(s0,line_store4a_output_H) ;read 24-bit line store 4 output 'A' and display30213 // @16a #698: CALL(send_hex_byte)0400b // @16b #699: INPUT(s0,line_store4a_output_M)30213 // @16c #700: CALL(send_hex_byte)0400a // @16d #701: INPUT(s0,line_store4a_output_L)30213 // @16e #702: CALL(send_hex_byte)30220 // @16f #703: CALL(send_space)0400f // @170 #704: INPUT(s0,line_store4b_output_H) ;read 24-bit line store 4 output 'B' and display30213 // @171 #705: CALL(send_hex_byte)0400e // @172 #706: INPUT(s0,line_store4b_output_M)30213 // @173 #707: CALL(send_hex_byte)0400d // @174 #708: INPUT(s0,line_store4b_output_L)30213 // @175 #709: CALL(send_hex_byte)30220 // @176 #710: CALL(send_space)04012 // @177 #711: INPUT(s0,line_store4c_output_H) ;read 24-bit line store 4 output 'C' and display30213 // @178 #712: CALL(send_hex_byte)04011 // @179 #713: INPUT(s0,line_store4c_output_M)30213 // @17a #714: CALL(send_hex_byte)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?