Author Topic: HP Logic Analyzer Inverse Assemblers  (Read 9059 times)

0 Members and 2 Guests are viewing this topic.

Offline MarkL

  • Supporter
  • ****
  • Posts: 1648
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #25 on: May 23, 2018, 02:25:28 pm »
That's some great progress, gslick!

Interesting that TASK==3 (for the HP 64620) could dynamically select which STAT decoding to use.  It seems like that functionality would be easy to carry forward to newer models instead of having to load separate IAs.  It's not like they were saving any IA interpreter code space.
 

Offline gslick

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #26 on: May 25, 2018, 05:59:32 am »
Below is what I now get from processing the "6800/02 IA FOR GP PROBES     1_0" inverse assembler file i6800_p after adding some logic to handle declaring variables and constants with their initial values, and declaring strings and format strings instead of putting them inline.

If you assemble this with the 10391B ASM.EXE assembler it should produce an i6800_p.r relocatable file that binary compares with the one extracted from the INVASM.ZIP collection, with the exception of the Name Record at the beginning of the file which includes the complete source file name and path. If the file name path length differs the whole remainder of the .R file will shift. There is also some other descriptive information in the Name Record which might get populated differently between the 10391B ASM.EXE assembler and HP tools that might have been used on different hosts.

The .R decoding code I wrote to do this is rather ugly. I just wanted to try to figure out exactly what it needed to do. I should make sure it works correctly on the other IA .R files, and then try to clean up the code.

Code: [Select]
"IAL"

*
* Original Source File Name: d:\ial\procs\i6800_p.s
*

        LABEL_TITLE      " 6800/6802 Mnemonic"
        BASE_TITLE       "        hex"
        SEARCH_LIMIT     12
        DEFAULT_WIDTH    21
        MAPPED_WIDTH     21
VAR_0034        VARIABLE 000000000H
VAR_0036        VARIABLE 000000000H
VAR_0038        VARIABLE 000000000H    * unreferenced
VAR_003A        VARIABLE 000000000H
VAR_003C        VARIABLE 000000000H
VAR_003E        VARIABLE 000000000H
VAR_0040        VARIABLE 000000000H
FMT_0010        FORMAT 16,HEX,4
FMT_0012        FORMAT 8,HEX,2
STR_0014        ASCII "A"
STR_0015        ASCII "B"
STR_0016        ASCII "C"
STR_0017        ASCII "H"    * unreferenced
STR_0018        ASCII "I"
STR_0019        ASCII "S"
STR_001A        ASCII "V"
STR_001B        ASCII "X"
STR_001C        ASCII "PUL"
STR_001E        ASCII "PSH"
STR_0020        ASCII ","    * unreferenced
STR_0021        ASCII "-"    * unreferenced
STR_0022        ASCII ",X"
STR_0024        ASCII "operand fetch"
STR_002B        ASCII "stack read"
STR_0031        ASCII "stack write"
STR_0037        ASCII "halt"
STR_003A        ASCII "vector"
STR_003E        ASCII "unused"
STR_0042        ASCII "opcode fetch"
STR_0049        ASCII "DMA read"
STR_004E        ASCII "DMA write"
STR_0053        ASCII "memory read"
STR_0059        ASCII "memory write"
STR_0060        ASCII "out of synch"
STR_0067        ASCII "interrupt ack"
STR_006E        ASCII "Illegal Opcode"
STR_0076        ASCII "unused cycle"
STR_007D        ASCII "dma or halt"
STR_0083        ASCII "non valid cycle"
CONST_0042      CONSTANT 00000FFFFH
CONST_0044      CONSTANT 00000FF00H
CONST_0046      CONSTANT 0FFFFFF00H

ENTRY_POINT
    IF TASK = 3 THEN GOTO LABEL_0010
    IF TASK = 4 THEN GOTO LABEL_0015
    IF TASK = 5 THEN GOTO LABEL_0015
    OUTPUT "Illegal Task Request"
    ABORT
    OUTPUT "Data Error"
    ABORT

LABEL_000D
    POSITION ABS,1
    OUTPUT STR_006E    * "Illegal Opcode"
    ABORT

LABEL_0010
    LOAD ID_CODE
    IF 7,0 = 0000000F0H THEN GOTO LABEL_0016
    GOTO LABEL_0026

LABEL_0015
    GOTO LABEL_0016

LABEL_0016
    LOAD INPUT_TAG
    IF 17,16 = 0 THEN GOTO LABEL_0043
    LOAD INPUT_STATUS
    IF 2,2 = 1 THEN GOTO LABEL_0043
    LOAD INPUT_TAG
    CASE_OF 1,0
        GOTO LABEL_01A2
        GOTO LABEL_0043
        GOTO LABEL_0054
        NOP
    CASE_END
    RETURN

LABEL_0026
    LOAD INPUT_STATUS
    IF 3,0 = 9 THEN GOTO LABEL_005B
    LOAD INPUT_DATA
    POSITION ABS,3
    OUTPUT ACCUMULATOR,FMT_0012
    POSITION REL,1
    LOAD INPUT_STATUS
    CASE_OF 3,0
        OUTPUT STR_006E    * "Illegal Opcode"
        OUTPUT STR_0024    * "operand fetch"
        OUTPUT STR_002B    * "stack read"
        OUTPUT STR_0031    * "stack write"
        OUTPUT STR_002B    * "stack read"
        OUTPUT STR_0031    * "stack write"
        OUTPUT STR_0037    * "halt"
        OUTPUT STR_003A    * "vector"
        OUTPUT STR_003E    * "unused"
        OUTPUT STR_0042    * "opcode fetch"
        OUTPUT STR_0049    * "DMA read"
        OUTPUT STR_004E    * "DMA write"
        OUTPUT STR_0059    * "memory write"
        OUTPUT STR_0053    * "memory read"
        OUTPUT STR_0060    * "out of synch"
        OUTPUT STR_0067    * "interrupt ack"
    CASE_END
    SET RETURN_FLAGS,0
    RETURN

LABEL_0043
    LOAD INPUT_DATA
    POSITION ABS,3
    OUTPUT ACCUMULATOR,FMT_0012
    POSITION REL,1
    LOAD INPUT_STATUS
    CASE_OF 2,0
        OUTPUT STR_0083    * "non valid cycle"
        OUTPUT STR_0083    * "non valid cycle"
        OUTPUT STR_0059    * "memory write"
        OUTPUT STR_0053    * "memory read"
        OUTPUT STR_007D    * "dma or halt"
        OUTPUT STR_007D    * "dma or halt"
        OUTPUT STR_007D    * "dma or halt"
        OUTPUT STR_007D    * "dma or halt"
    CASE_END
    SET RETURN_FLAGS,0
    RETURN

LABEL_0054
    LOAD INPUT_DATA
    POSITION ABS,3
    OUTPUT ACCUMULATOR,FMT_0012
    POSITION REL,1
    OUTPUT STR_0076    * "unused cycle"
    SET RETURN_FLAGS,0
    RETURN

LABEL_005B
    SET RETURN_FLAGS,1
    INPUT REL,0
    LOAD INITIAL_DATA
    CASE_OF 7,7
        GOTO LABEL_0062
        GOTO LABEL_0103
    CASE_END

LABEL_0062
    CASE_OF 7,4
        GOTO LABEL_006C
        GOTO LABEL_008C
        GOTO LABEL_009F
        GOTO LABEL_00C4
        GOTO LABEL_00E2
        GOTO LABEL_00E2
        GOTO LABEL_00E2
        GOTO LABEL_00E2
    CASE_END

LABEL_006C
    CASE_OF 3,0
        GOTO LABEL_000D
        OUTPUT "NOP"
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        OUTPUT "TAP"
        OUTPUT "TPA"
        OUTPUT "INX"
        OUTPUT "DEX"
        GOTO LABEL_007F
        GOTO LABEL_0081
        GOTO LABEL_007F
        GOTO LABEL_0081
        GOTO LABEL_007F
        GOTO LABEL_0081
    CASE_END
    RETURN

LABEL_007F
    OUTPUT "CL"
    GOTO LABEL_0082

LABEL_0081
    OUTPUT "SE"

LABEL_0082
    IF 2,1 = 1 THEN OUTPUT STR_001A    * "V"
    IF 2,1 = 2 THEN OUTPUT STR_0016    * "C"
    IF 2,1 = 3 THEN OUTPUT STR_0018    * "I"
    RETURN

LABEL_008C
    CASE_OF 3,0
        OUTPUT "SBA"
        OUTPUT "CBA"
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        OUTPUT "TAB"
        OUTPUT "TBA"
        GOTO LABEL_000D
        OUTPUT "DAA"
        GOTO LABEL_000D
        OUTPUT "ABA"
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
    CASE_END
    RETURN

LABEL_009F
    OUTPUT STR_0015    * "B"
    CASE_OF 3,0
        OUTPUT "RA"
        GOTO LABEL_000D
        OUTPUT "HI"
        OUTPUT "LS"
        OUTPUT "CC"
        OUTPUT "CS"
        OUTPUT "NE"
        OUTPUT "EQ"
        OUTPUT "VC"
        OUTPUT "VS"
        OUTPUT "PL"
        OUTPUT "MI"
        OUTPUT "GE"
        OUTPUT "LT"
        OUTPUT "GT"
        OUTPUT "LE"
    CASE_END

LABEL_00B2
    INCREMENT INPUT_ADDRESS
    LOAD INPUT_ADDRESS
    ADD 1
    STORE VAR_003E
    INPUT ABS,INPUT_ADDRESS
    IF INPUT_ERROR <> 0 THEN GOTO LABEL_017C
    LOAD INPUT_DATA
    POSITION ABS,6
    IF 7,7 = 1 THEN INCLUSIVE_OR CONST_0046
    ADD VAR_003E
    AND CONST_0042
    IF_NOT_MAPPED THEN OUTPUT ACCUMULATOR,FMT_0010
    RETURN

LABEL_00C4
    CASE_OF 3,0
        OUTPUT "TSX"
        OUTPUT "INS"
        GOTO LABEL_00D7
        GOTO LABEL_00D7
        OUTPUT "DES"
        OUTPUT "TXS"
        GOTO LABEL_00D7
        GOTO LABEL_00D7
        GOTO LABEL_000D
        OUTPUT "RTS"
        GOTO LABEL_000D
        OUTPUT "RTI"
        GOTO LABEL_000D
        GOTO LABEL_000D
        OUTPUT "WAI"
        OUTPUT "SWI"
    CASE_END
    RETURN

LABEL_00D7
    IF 2,2 = 0 THEN OUTPUT STR_001C    * "PUL"
    IF 2,2 = 1 THEN OUTPUT STR_001E    * "PSH"
    CASE_OF 0,0
        GOTO LABEL_00FF
        GOTO LABEL_0101
    CASE_END
    RETURN

LABEL_00E2
    CASE_OF 3,0
        OUTPUT "NEG"
        GOTO LABEL_000D
        GOTO LABEL_000D
        OUTPUT "COM"
        OUTPUT "LSR"
        GOTO LABEL_000D
        OUTPUT "ROR"
        OUTPUT "ASR"
        OUTPUT "ASL"
        OUTPUT "ROL"
        OUTPUT "DEC"
        GOTO LABEL_000D
        OUTPUT "INC"
        OUTPUT "TST"
        GOTO LABEL_00F5
        OUTPUT "CLR"
    CASE_END
    GOTO LABEL_00F9

LABEL_00F5
    CASE_OF 5,5
        GOTO LABEL_000D
        OUTPUT "JMP"
    CASE_END

LABEL_00F9
    CASE_OF 5,4
        GOTO LABEL_00FF
        GOTO LABEL_0101
        GOTO LABEL_016B
        GOTO LABEL_0170
    CASE_END

LABEL_00FF
    OUTPUT STR_0014    * "A"
    RETURN

LABEL_0101
    OUTPUT STR_0015    * "B"
    RETURN

LABEL_0103
    CASE_OF 3,0
        OUTPUT "SUB"
        OUTPUT "CMP"
        OUTPUT "SBC"
        GOTO LABEL_000D
        OUTPUT "AND"
        OUTPUT "BIT"
        OUTPUT "LDA"
        GOTO LABEL_0116
        OUTPUT "EOR"
        OUTPUT "ADC"
        OUTPUT "ORA"
        OUTPUT "ADD"
        GOTO LABEL_011E
        GOTO LABEL_0126
        GOTO LABEL_0138
        GOTO LABEL_0141
    CASE_END
    GOTO LABEL_0150

LABEL_0116
    IF 7,4 = 8 THEN GOTO LABEL_000D
    IF 7,4 = 12 THEN GOTO LABEL_000D
    OUTPUT "STA"
    GOTO LABEL_0150

LABEL_011E
    IF 7,4 >= 12 THEN GOTO LABEL_000D
    OUTPUT "CPX"
    IF 5,4 = 0 THEN GOTO LABEL_0161
    GOTO LABEL_0156

LABEL_0126
    IF 7,4 = 9 THEN GOTO LABEL_000D
    IF 7,4 >= 12 THEN GOTO LABEL_000D
    IF 5,4 = 0 THEN GOTO LABEL_0136
    OUTPUT "JSR"
    IF 5,4 = 2 THEN GOTO LABEL_016B
    IF 5,4 = 3 THEN GOTO LABEL_0170

LABEL_0136
    OUTPUT "BSR"
    GOTO LABEL_00B2

LABEL_0138
    OUTPUT "LD"
    CASE_OF 6,6
        OUTPUT STR_0019    * "S"
        OUTPUT STR_001B    * "X"
    CASE_END
    IF 5,4 = 0 THEN GOTO LABEL_0161
    GOTO LABEL_0156

LABEL_0141
    IF 7,4 = 8 THEN GOTO LABEL_000D
    IF 7,4 = 12 THEN GOTO LABEL_000D
    OUTPUT "ST"
    CASE_OF 6,6
        OUTPUT STR_0019    * "S"
        OUTPUT STR_001B    * "X"
    CASE_END
    IF 5,4 = 0 THEN GOTO LABEL_0161
    GOTO LABEL_0156

LABEL_0150
    IF 6,6 = 0 THEN CALL LABEL_00FF
    IF 6,6 = 1 THEN CALL LABEL_0101

LABEL_0156
    CASE_OF 5,4
        GOTO LABEL_015C
        GOTO LABEL_0166
        GOTO LABEL_016B
        GOTO LABEL_0170
    CASE_END

LABEL_015C
    POSITION ABS,6
    OUTPUT "#"
    CALL LABEL_0175
    OUTPUT ACCUMULATOR,FMT_0012
    RETURN

LABEL_0161
    POSITION ABS,6
    OUTPUT "#"
    CALL LABEL_017E
    OUTPUT ACCUMULATOR,FMT_0010
    RETURN

LABEL_0166
    POSITION ABS,6
    CALL LABEL_0175
    IF_NOT_MAPPED THEN OUTPUT ACCUMULATOR,FMT_0010
    RETURN

LABEL_016B
    POSITION ABS,6
    CALL LABEL_0175
    OUTPUT ACCUMULATOR,FMT_0012
    OUTPUT STR_0022    * ",X"
    RETURN

LABEL_0170
    POSITION ABS,6
    CALL LABEL_017E
    IF_NOT_MAPPED THEN OUTPUT ACCUMULATOR,FMT_0010
    RETURN

LABEL_0175
    INCREMENT INPUT_ADDRESS
    INPUT ABS,INPUT_ADDRESS
    IF INPUT_ERROR <> 0 THEN GOTO LABEL_017C
    LOAD INPUT_DATA
    RETURN

LABEL_017C
    OUTPUT "**"
    ABORT

LABEL_017E
    INCREMENT INPUT_ADDRESS
    LOAD INPUT_ADDRESS
    STORE VAR_003C
    INPUT ABS,INPUT_ADDRESS
    IF INPUT_ERROR <> 0 THEN GOTO LABEL_0192
    LOAD INPUT_DATA
    ROTATE LEFT,8
    AND CONST_0044
    STORE VAR_0034
    INCREMENT INPUT_ADDRESS
    INPUT ABS,INPUT_ADDRESS
    IF INPUT_ERROR <> 0 THEN GOTO LABEL_019D
    LOAD INPUT_DATA
    AND 0000000FFH
    INCLUSIVE_OR VAR_0034
    RETURN

LABEL_0192
    OUTPUT "**"
    LOAD VAR_003C
    STORE INPUT_ADDRESS
    INCREMENT INPUT_ADDRESS
    INPUT ABS,INPUT_ADDRESS
    IF INPUT_ERROR <> 0 THEN GOTO LABEL_01A0
    LOAD INPUT_DATA
    OUTPUT ACCUMULATOR,FMT_0012
    ABORT

LABEL_019D
    LOAD VAR_0034
    ROTATE RIGHT,8
    OUTPUT ACCUMULATOR,FMT_0012

LABEL_01A0
    OUTPUT "**"
    ABORT

LABEL_01A2
    SET VAR_0040,0

LABEL_01A3
    LOAD INPUT_STATUS
    IF 1,0 = 3 THEN GOTO LABEL_01AE
    TAG_WITH 2
    INCREMENT VAR_0040
    INPUT REL,VAR_0040
    IF INPUT_ERROR <> 0 THEN GOTO LABEL_005B
    GOTO LABEL_01A3

LABEL_01AE
    LOAD INPUT_DATA
    CASE_OF 7,0
        GOTO LABEL_000D
        LOAD 56
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        LOAD 0000003A8H
        LOAD 0000003A8H
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        LOAD 56
        GOTO LABEL_000D
        LOAD 56
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 0000003A4H
        GOTO LABEL_000D
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A4H
        LOAD 0000003A8H
        LOAD 0000003A8H
        LOAD 000000368H
        LOAD 000000368H
        LOAD 0000003A8H
        LOAD 0000003A8H
        LOAD 000000398H
        LOAD 000000398H
        GOTO LABEL_000D
        LOAD 000000D68H
        GOTO LABEL_000D
        LOAD 000355568H
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 00D695558H
        LOAD 003595558H
        LOAD 56
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        LOAD 56
        LOAD 56
        GOTO LABEL_000D
        LOAD 56
        LOAD 00000D9A4H
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 00000D9A4H
        LOAD 00000D9A4H
        GOTO LABEL_000D
        LOAD 00000D9A4H
        LOAD 00000D9A4H
        LOAD 00000D9A4H
        LOAD 00000D9A4H
        LOAD 00000D9A4H
        GOTO LABEL_000D
        LOAD 00000D9A4H
        LOAD 00000EAA4H
        LOAD 0000003A4H
        LOAD 00000D9A4H
        LOAD 000003654H
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 000003654H
        LOAD 000003654H
        GOTO LABEL_000D
        LOAD 000003654H
        LOAD 000003654H
        LOAD 000003654H
        LOAD 000003654H
        LOAD 000003654H
        GOTO LABEL_000D
        LOAD 000003654H
        LOAD 000003A54H
        LOAD 0000000D4H
        LOAD 000003654H
        LOAD 52
        LOAD 52
        LOAD 52
        GOTO LABEL_000D
        LOAD 52
        LOAD 52
        LOAD 52
        GOTO LABEL_000D
        LOAD 52
        LOAD 52
        LOAD 52
        LOAD 52
        LOAD 0000000D4H
        LOAD 00003A964H
        LOAD 0000000D4H
        GOTO LABEL_000D
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 0000000D4H
        GOTO LABEL_000D
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 000000364H
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 000000354H
        GOTO LABEL_000D
        LOAD 000000354H
        LOAD 000000D64H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        GOTO LABEL_000D
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 0000036A4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 0000035A4H
        LOAD 00003A964H
        LOAD 0000035A4H
        LOAD 00000D6A4H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000354H
        GOTO LABEL_000D
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000D94H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000D54H
        LOAD 0000EA594H
        LOAD 000000D54H
        LOAD 000003594H
        LOAD 52
        LOAD 52
        LOAD 52
        GOTO LABEL_000D
        LOAD 52
        LOAD 52
        LOAD 52
        GOTO LABEL_000D
        LOAD 52
        LOAD 52
        LOAD 52
        LOAD 52
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 0000000D4H
        GOTO LABEL_000D
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 0000000D4H
        GOTO LABEL_000D
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 000000364H
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 0000000D4H
        LOAD 0000000D4H
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 000000354H
        LOAD 000000D64H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        GOTO LABEL_000D
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 0000036A4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        LOAD 000000DA4H
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 0000035A4H
        LOAD 00000D6A4H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000354H
        GOTO LABEL_000D
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000D94H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000354H
        LOAD 000000354H
        GOTO LABEL_000D
        GOTO LABEL_000D
        LOAD 000000D54H
        LOAD 000003594H
    CASE_END

LABEL_02B1
    STORE VAR_0036
    AND 3
    STORE VAR_003A
    IF 1,0 = 3 THEN GOTO LABEL_005B
    TAG_WITH VAR_003A

LABEL_02B8
    INCREMENT VAR_0040
    INPUT REL,VAR_0040
    IF INPUT_ERROR <> 0 THEN GOTO LABEL_005B
    LOAD INPUT_STATUS
    IF 2,2 = 1 THEN GOTO LABEL_02B8
    LOAD VAR_0036
    ROTATE RIGHT,2
    GOTO LABEL_02B1
 
The following users thanked this post: MarkL, TimInCanada

Offline MarkL

  • Supporter
  • ****
  • Posts: 1648
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #27 on: May 25, 2018, 02:35:02 pm »
Wow, this is great!

As a double check I changed some of the state decode text slightly, recompiled with ASM.EXE, and loaded the new version with the IA Format Utility on a 16702B.  Works perfectly on a 6802 processor I have connected.

I like your automatic comments for "unreferenced" and carrying the text values back to the line(s) that references it.  Your "unreferenced" works better than the -x (cross-reference) option in ASM.EXE.  The -x option misses references inside IF statements.

One thing I wanted to do with the 6800 IA is remove the dependency for displaying VMA=0 (unused) memory cycles.  When looking at code flow, I don't really care about internal processor cycles that only clutter up the screen and waste capture memory.  Some of the other display states not currently available via general probing can also be added.  Now it's all possible without starting from scratch.
 

Offline gslick

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #28 on: May 26, 2018, 05:36:58 pm »
I went through all 24 of the .R files extracted from the Inverse Assembler files in the original INVASM.ZIP and decoded them back into .S source files for use with the 10391B ASM.EXE assembler.

When the exception of the differences in original source file name information in the initial Name Record the resulting .R files produced by assembling the .S source files for use with the 10391B ASM.EXE assembler should binary compare with the originally extracted .R files.

The only other exception is that both the i80386_i.R and i80386_8.7.R files contains records for what appears to be a format string with the value 0x4401FFFF, which might mean "FORMAT 32,HEX,LEFT_JUSTIFIED", which should normally have a value 0x240883E0 without any of the extra bits set. Maybe the value 0x4401FFFF means something else. In both cases they appears to be unreferenced.

EDIT: I figured this out. The special format value 0x4401FFFF means "FORMAT ASCII". I missed that FORMAT option in the 10391B manual. I'll have to go back later and update the generated .S files where that was decoded as "FORMAT 32,HEX,LEFT_JUSTIFIED".

One of the last things that I had to figure out was the correct syntax for these opcodes. They are not listed in the 10391B manual, but are present in the AIAL table file. Three of the files in the INVASM collection use MARK_LINE opcodes.

Code: [Select]
                        1 "IAL"
                        2
    0000                3 ENTRY_POINT
    0000 00000000       4     NOP
    0001 0014           5     TRACE_ON                    * ION_TRACE = 20
    0002 0015           6     TRACE_OFF                   * IOFF_TRACE = 21
    0003 0018           7     MARK_LINE OTHER,NO_ADDRESS  * IMARKLINE_O_NA = 24
    0004 0019           8     MARK_LINE SOURCE,NO_ADDRESS * IMARKLINE_S_NA = 25
    0005 001A           9     MARK_LINE OTHER             * IMARKLINE_O_A = 26
    0006 001B          10     MARK_LINE SOURCE            * IMARKLINE_S_A = 27
    0007 001C          11     MARK_STATE DISPLAYED        * IMARKSTATE_DISP = 28
    0008 001D          12     MARK_STATE SUPPRESSED       * IMARKSTATE_SUP = 29
    0009 0013          13     RETURN

I haven't taken a real close look at these generated .S source files to make sure everything looks reasonable in all of them. I was more focused on just making sure they all assemble correctly and regenerate matching .R files for now. I'll go ahead and share what I have so far, for the handful of people that might actually be interested in this stuff.
« Last Edit: May 26, 2018, 08:26:16 pm by gslick »
 
The following users thanked this post: MarkL, TimInCanada, alm

Offline gslick

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #29 on: May 26, 2018, 08:54:57 pm »
Attached are decoded Inverse Assembler .S source code files for the 10342B HPIB, RS-232, RS-449 interface.

Code: [Select]
IA File: IHPIB_I
IA Description: "HPIB IA FOR INTERFACE        1_0"
IA Field Option: A

IA File: IRS232_I
IA Description: "RS232 IA FOR INTERFACE       1_0"
IA Field Option: A

IA File: IRS449_I
IA Description: "RS449 IA FOR INTERFACE       1_0"
IA Field Option: A
 
The following users thanked this post: MarkL, TimInCanada

Offline TimInCanada

  • Contributor
  • Posts: 48
  • Country: ca
Re: HP Logic Analyzer Inverse Assemblers
« Reply #30 on: June 05, 2018, 08:03:28 pm »
Wow!  I am in absolute awe of you guys.  Well Done!  :clap:

Mark: I still can't get my 16702B/16712A to load the formatted 6800 IA, but the IA Format utility is happy with the .R file you came up with.  Thank you.

Tim
 

Online sleary78

  • Supporter
  • ****
  • Posts: 42
  • Country: gb
Re: HP Logic Analyzer Inverse Assemblers
« Reply #31 on: September 13, 2018, 03:50:56 pm »
I am using my HP1661CS with the ethernet option so i knocked up a python script to replace IALDOWN

https://pastebin.com/BfLZfBmj

Probably buggy but it works just like the original.
 

Offline jackrubin

  • Newbie
  • Posts: 1
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #32 on: December 18, 2018, 04:43:18 pm »
Wow! Just stumbled across this post on a topic that I haven't thought much about for the last few years. Great to see the current work and gslick still going at it! Thanks to Glenn, Mark and all the other contributors.

Best to all and a HP New Year!
Jack

*************
BTW, I'm not sure the license file - "The 16700 analyzers have the B4620B Software Correlation Tool option.  The analyzer comes with the tool installed, but needs a license to use.  Fortunately, the license file is available for non-commercial use (along with licenses for the other options)." - mentioned above made the transition from Yahoo groups to groups.io.

Can anyone point to a copy of it? I'll be happy to add it to Groups.io Agilent group

Thanks -

« Last Edit: December 18, 2018, 04:53:17 pm by jackrubin »
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 1648
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #33 on: December 18, 2018, 09:30:55 pm »
BTW, I'm not sure the license file - "The 16700 analyzers have the B4620B Software Correlation Tool option.  The analyzer comes with the tool installed, but needs a license to use.  Fortunately, the license file is available for non-commercial use (along with licenses for the other options)." - mentioned above made the transition from Yahoo groups to groups.io.

Can anyone point to a copy of it? I'll be happy to add it to Groups.io Agilent group
The license file is text.  The content of the file is embedded in a post, so it got moved from yahoo and it's still there.

In the HP-Agilent-Keysight group, search for "16700 software tool sets" for a post from Apr 17 24, 2015.  Then search for "HP/Agilent 16702 Software Tools License Keys" for a followup spelling correction to the InfiniBand key.

EDIT: Correction on the date - it was Apr 24, not the 17th.
« Last Edit: December 22, 2018, 04:32:02 pm by MarkL »
 
The following users thanked this post: jackrubin

Offline MarkL

  • Supporter
  • ****
  • Posts: 1648
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #34 on: January 04, 2019, 12:57:21 am »
I did some experimenting with the network protocol inverse assembler (aka. protocol decoder) on a 16702B logic analyzer and mikeselectricstuff's new etherdecode board.  I'm dropping a link in this thread since some of you IA fans may want to know how to set up and use the INETWRKE inverse assembler:

  https://www.eevblog.com/forum/testgear/ethernet-trigger-an-protocol-decoding-for-mso-or-logic-analyser/msg2088775/#msg2088775

It doesn't have to be used with Mike's board, but I thought it would be a fun way to learn more about the 16700 series capabilities and make Mike's board easier to use.

If you have questions specifically about the analyzer setup, it might be better to post them here so we don't throw Mike's thread too far off-topic.
 

Offline nemike

  • Newbie
  • Posts: 2
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #35 on: February 16, 2019, 10:42:14 pm »
I'm trying to load an inverse assembler for 68010 from invasm_v3 on my 1670d (latest firmware), I only recently got it and am trying to learn to use it but haven't had much success in understanding how to load an inverse assembler.  I downloaded invadm_v3 and while I can select "load analyzer from i68010_p" (shows file type: inverse_assem) it says "No state machines for this module", if I configure it as follows:

Label  0: ADDR     (24 bits):  A3: ******** ........  A2: ******** ********
Label  1: DATA     (16 bits):  A1: ******** ********
Label  2: STAT     ( 8 bits):  A3: ........ ********
Label  3: SIZE     ( 2 bits):  A3: ........ .....**.
Label  4: VMA      ( 1 bits):  A3: ........ ....*...
Label  5: FC       ( 3 bits):  A3: ........ .***....

And then "load analyzer from i68010_p" it flashes the asterisk in the top right but nothing seems to happen and when I go to config or waveform or listing I don't see anything...  What am I missing?

Thanks, Mike
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 1648
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #36 on: February 17, 2019, 07:13:28 pm »
...
And then "load analyzer from i68010_p" it flashes the asterisk in the top right but nothing seems to happen and when I go to config or waveform or listing I don't see anything...  What am I missing?

Thanks, Mike
I don't have a 1670 series to directly help with the issue you're seeing, but you might try loading the configuration file c68010_p instead.  In my reading of the manual, I think loading the configuration file should automatically load the associated inverse assembler after it has processed the configuration.  Maybe there's some other setup it needs to perform first.

The configuration files in that zip file are for a 16510 analyzer, but the manual says the 1670G should be able to read them.

Perhaps someone with a 1670 (or 16510) could help out more.
 

Offline nemike

  • Newbie
  • Posts: 2
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #37 on: February 18, 2019, 06:57:31 am »
I don't have a 1670 series to directly help with the issue you're seeing, but you might try loading the configuration file c68010_p instead.  In my reading of the manual, I think loading the configuration file should automatically load the associated inverse assembler after it has processed the configuration.  Maybe there's some other setup it needs to perform first.

The configuration files in that zip file are for a 16510 analyzer, but the manual says the 1670G should be able to read them.

Perhaps someone with a 1670 (or 16510) could help out more.

Thanks this helped, I was able to load the c68010_p and indeed the inverse assembler showed up in the listing section, but I did get some messages when it loaded:



This gave me the following format views:




I had setup my own configuration and format that looked like the c68010_p.txt file:



That is when I had tried to load the i68010_p file without error but it didn't seem to appear available in the listing view.

So I can use that 68010 as is but I can't use the invasm in my own configuration which might include other signals from elsewhere...

Thanks, Mike
« Last Edit: February 18, 2019, 07:01:41 am by nemike »
 

Offline gslick

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #38 on: February 18, 2019, 07:13:04 pm »
I loaded c68010_p from invasm_v3 on a 16510 module in a 16500C and captured these resulting configuration screens.

Configuration:



Format:



Symbols:















Listing:






« Last Edit: February 18, 2019, 07:25:15 pm by gslick »
 

Offline gslick

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #39 on: February 18, 2019, 07:41:54 pm »
If you connect your 1670D to a network so that you can do FTP transfers to the analyzer from another machine on the network, you can send the program file below to the 1670D to recreate the c68010_p configuration on the 1670D.

On the 1670D System - External I/O screen make sure the Controller is Connected To: Ethernet (instead of HPIB or RS-232C). Then on the 1670D System - External I/O screen make sure the LAN Settings - Analyzer IP Address is appropriate for your network.

Then you can open an FTP connection to the 1670D from another system on your network and login as user "control". Then "cd /system", then "put program", assuming that the program below is saved to a file named "program" on system on which you are running FTP.

This program assumes that the invasm file "I68010_P" has been copied to the directory "\INVASMV3" on the hard drive of the 1670D.

I verified that this works on my 1670D.

Code: [Select]
:SELECT 1
:MACHINE1:NAME '68010'
:MACHINE1:ASSIGN 1,2,3,4
:MACHINE1:TYPE STATE
:MACHINE2:TYPE OFF
:MACHINE1:SFORMAT:MASTER J, RISING
:MACHINE1:SFORMAT:REMOVE ALL
:MACHINE1:SFORMAT:LABEL 'ADDR', POSITIVE, #H0, #H0000, #HFF00, #HFFFF, #H0000
:MACHINE1:SFORMAT:LABEL 'DATA', POSITIVE, #H0, #H0000, #H0000, #H0000, #HFFFF
:MACHINE1:SFORMAT:LABEL 'STAT', POSITIVE, #H0, #H0000, #H00FF, #H0000, #H0000
:MACHINE1:SFORMAT:LABEL 'SIZE', POSITIVE, #H0, #H0000, #H0006, #H0000, #H0000
:MACHINE1:SFORMAT:LABEL 'VMA',  POSITIVE, #H0, #H0000, #H0008, #H0000, #H0000
:MACHINE1:SFORMAT:LABEL 'FC',   POSITIVE, #H0, #H0000, #H0070, #H0000, #H0000
:MMEMORY:CD '\INVASMV3', INTERNAL0
:MMEMORY:LOAD:IASSEMBLER 'I68010_P', INTERNAL0, 1, 1
:MMEMORY:CD '\', INTERNAL0
:MACHINE1:SYMBOL:REMOVE
:MACHINE1:SYMBOL:WIDTH 'STAT', 15
:MACHINE1:SYMBOL:BASE  'STAT', BINARY
:MACHINE1:SYMBOL:PATTERN 'STAT', 'DMA',             '#B0XXXXXXX'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'USER DATA WRITE', '#B1001XXX0'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'USER DATA READ',  '#B1001XXX1'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'USER PGRM READ',  '#B1010XXX1'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'SUPR DATA WRITE', '#B1101XXX0'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'SUPR DATA READ',  '#B1101XXX1'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'SUPR PGRM READ',  '#B1110XXX1'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'INTERRUPT ACK',   '#B1111XXXX'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'OPCODE FETCH',    '#B1X10XXX1'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'READ',            '#BXXXXXXX1'
:MACHINE1:SYMBOL:PATTERN 'STAT', 'WRITE',           '#BXXXXXXX0'
:MACHINE1:SYMBOL:WIDTH 'SIZE', 9
:MACHINE1:SYMBOL:BASE  'SIZE', BINARY
:MACHINE1:SYMBOL:PATTERN 'SIZE', 'LOW BYTE',  '#B10'
:MACHINE1:SYMBOL:PATTERN 'SIZE', 'HIGH BYTE', '#B01'
:MACHINE1:SYMBOL:PATTERN 'SIZE', 'WORD',      '#B00'
:MACHINE1:SYMBOL:WIDTH 'VMA', 10
:MACHINE1:SYMBOL:BASE  'VMA', BINARY
:MACHINE1:SYMBOL:PATTERN 'VMA', '6800 CYCLE', '#B1'
:MACHINE1:SYMBOL:PATTERN 'VMA', '',           '#B0'
:MACHINE1:SYMBOL:WIDTH 'FC', 9
:MACHINE1:SYMBOL:BASE  'FC', BINARY
:MACHINE1:SYMBOL:PATTERN 'FC', 'USER DATA', '#B001'
:MACHINE1:SYMBOL:PATTERN 'FC', 'USER PROG', '#B010'
:MACHINE1:SYMBOL:PATTERN 'FC', 'SUPR DATA', '#B101'
:MACHINE1:SYMBOL:PATTERN 'FC', 'SUPR PROG', '#B110'
:MACHINE1:SYMBOL:PATTERN 'FC', 'INTR ACK',  '#B111'
:MACHINE1:SYMBOL:PATTERN 'FC', 'USER',      '#B0XX'
:MACHINE1:SYMBOL:PATTERN 'FC', 'SUPR',      '#B1XX'
:MACHINE1:SYMBOL:PATTERN 'FC', '     DATA', '#BX01'
:MACHINE1:SYMBOL:PATTERN 'FC', '     PROG', '#BX10'
:MACHINE1:STRIGGER:CLEAR ALL
:MACHINE1:SLIST:REMOVE
:MACHINE1:SLIST:COLUMN 1, 'ADDR', HEXADECIMAL
:MACHINE1:SLIST:COLUMN 2, 'DATA', IASSEMBLER
:MACHINE1:SLIST:COLUMN 3, 'STAT', SYMBOL
:MACHINE1:SLIST:COLUMN 4, 'SIZE', SYMBOL
:MACHINE1:SLIST:COLUMN 5, 'VMA',  SYMBOL
:MACHINE1:SLIST:COLUMN 6, 'FC',   SYMBOL
:MACHINE1:SWAVEFORM:REMOVE
:MACHINE1:SWAVEFORM:INSERT 'ADDR', OVERLAY
:MACHINE1:SWAVEFORM:INSERT 'DATA', OVERLAY
:MACHINE1:SWAVEFORM:INSERT 'STAT', OVERLAY
:MENU 1,7
 

Offline Tom Swift

  • Contributor
  • Posts: 5
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #40 on: May 04, 2019, 07:37:22 am »
I don't get it.  I've tried them all and they all say the same thing.  What am I doing wrong?

Nevermind, gotta change it to 'Load' 'Analyzer' from file '<file>'

The c6809e_p.txt file says:

Title: 6809E CONFIG FOR GP PROBES   1_0

Pod assigments (? = disabled)
-----------------------------
Label  0: ADDR     (16 bits):  A2: ******** ******** 
Label  1: DATA     ( 8 bits):  A1: ........ ******** 
Label  2: STAT     ( 3 bits):  A1: .....*** ........ 

Symbols
-------
Label: STAT 
       INTR/RESET VECTR  01X
       SYNC ACKNOWLEDGE  10X
       HALT/BUS GRANT    11X
       WRITE             000
       READ              001


This is directly from the Motorola 6809 datasheet Page 6.

I'm guessing...
Pod A1: Channel 8 is to pin 32 of 6809E  (R//W)
Pod A1: Channel 9 is to pin 37 of 6809E (/RESET)
Pod A1: Channel 10 is to pin 40 of 6809E (/HALT)
Pod A1: Clk is to pin 34 of 6809E (E)

Is this correct?


Pod A1: Channel 8 is to pin 32 of 6809E  (R//W)
Pod A1: Channel 9 is to pin 5 of 6809E (BS)
Pod A1: Channel 10 is to pin 6 of 6809E (BA)
Pod A1: Clk is to pin 34 of 6809E (E)  (Still unsure about this one...)  (EDIT: This is correct)

Is this correct? (EDIT: This is correct)

So after all this I get:



Why isn't the address advancing?  It goes all the way to 4095 in the list.  RESET isn't LOW.
« Last Edit: May 05, 2019, 09:11:01 pm by Tom Swift »
 

Offline gslick

  • Frequent Contributor
  • **
  • Posts: 338
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #41 on: May 04, 2019, 11:42:22 pm »

Title: 6809E CONFIG FOR GP PROBES   1_0

Pod assigments (? = disabled)
-----------------------------
Label  0: ADDR     (16 bits):  A2: ******** ******** 
Label  1: DATA     ( 8 bits):  A1: ........ ******** 
Label  2: STAT     ( 3 bits):  A1: .....*** ........ 

Symbols
-------
Label: STAT 
       INTR/RESET VECTR  01X
       SYNC ACKNOWLEDGE  10X
       HALT/BUS GRANT    11X
       WRITE             000
       READ              001


Pod A1: Channel 8 is to pin 32 of 6809E  (R//W)
Pod A1: Channel 9 is to pin 5 of 6809E (BS)
Pod A1: Channel 10 is to pin 6 of 6809E (BA)
Pod A1: Clk is to pin 34 of 6809E (E)  (Still unsure about this one...)

Is this correct?

Why isn't the address advancing?  It goes all the way to 4095 in the list.  RESET isn't LOW.

I think you would want to clock on the falling edge of E. From the timing diagram it appears that both the address bus and the data bus should have stable and valid values at that point.

It does appear that using BA, BS, and R/W for the STAT signals would match the meaning of the MPU state definition according to those signals.

What happens if you trigger on address FFFF? There might be a lot of FFFE cycles when the reset condition first occurs.



 

Offline Tom Swift

  • Contributor
  • Posts: 5
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #42 on: May 05, 2019, 08:53:50 pm »
LOL!  I checked the wrong thread and wanted to reply.  Good call triggering on $FFFF.  So after going through all this, I have realized the data coming back after the initial vector read from $FFFE & $FFFF is getting corrupted.  I'll keep digging.  Thanks everyone!
 

Offline mmcgraw74

  • Contributor
  • Posts: 16
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #43 on: July 08, 2019, 12:14:23 am »
I should spend some time looking at the 16900 series Analysis AddIn Tool. It might contain enough information to write a tool to decode a .R file back into something that could be assembled again with the IAL assembler.

For example it contains this instruction opcode table. The opcode bit field positions vary in the instruction word based on the values of high order bits in the instruction word.

Code: [Select]
  /* definitions for the different unique bit patterns for each instruction
   * in the different instruction groups -- used by the interpreter
   */


I had a similar problem loading the C6800/02.I file on my HP 16500.

I solved it by manually creating the 6800 mapping from gslick's screenshots in this thread, including the User Symbols, making sure the machine name was 6800/02, then saving to the C6800/02 IA file.  Another file was created with that same name but newer timestamp - it was bigger, and also created a new config.txt file with that name.  Then I could power cycle my HP16500B and load the C6800/02.I file successfully.  I only had to change the User Symbol table back to Binary to see the symbols I had entered.
  /* instruction group 1 */
  const u_int16 IF_OP = 4;
  const u_int16 IF_BITS = 5;
  const u_int16 ICASE_OP = 6;
  const u_int16 ICASE_BITS = 7;

  /* instruction group 2 */
  const u_int16 IGO_TO = 4;
  const u_int16 ICALL = 5;
  const u_int16 ISTR_OUTPUT = 6;
  const u_int16 INUM_OUTPUT = 7;

  /* instruction group 3 */
  const u_int16 ILOAD_ACC = 8;
  const u_int16 IADD_ACC = 9;
  const u_int16 ISUB_ACC = 10;
  const u_int16 IAND_ACC = 11;
  const u_int16 IOR_ACC = 12;
  const u_int16 IXOR_ACC = 13;
  const u_int16 ITAG_WITH = 14;
  const u_int16 INP_ABS = 15;

  /* instruction group 4 */
  const u_int16 ISTORE_MEM = 4;
  const u_int16 INC_MEM = 5;
  const u_int16 IDEC_MEM = 6;
  const u_int16 INP_ABSQ = 7;

  /* instruction group 5 */
  const u_int16 INP_REL = 2;
  const u_int16 INP_RELQ = 3;

  /* instruction group 6 */
  const u_int16 IROT_LEFT = 8;
  const u_int16 IROT_RIGHT = 9;
  const u_int16 IEXT_BIT = 10;
  const u_int16 IPOS_ABS = 11;
  const u_int16 IPOS_REL = 12;

  /* instruction group 7 */
  const u_int16 INOP = 16;
  const u_int16 ICOMP_ACC = 17;
  const u_int16 ITWOCOMP_ACC = 18;
  const u_int16 IRETURN = 19;
  const u_int16 ION_TRACE = 20;
  const u_int16 IOFF_TRACE = 21;
  const u_int16 IABORT = 22;
  const u_int16 IFNOT_MAP = 23;
  const u_int16 IMARKLINE_O_NA = 24;
  const u_int16 IMARKLINE_S_NA = 25;
  const u_int16 IMARKLINE_O_A = 26;
  const u_int16 IMARKLINE_S_A = 27;
  const u_int16 IMARKSTATE_DISP = 28;
  const u_int16 IMARKSTATE_SUP = 29;
  const u_int16 INEWLINE = 30;
  const u_int16 IFETCH_POSITION = 31;

If I have this correct, the mapping from opcode words to instructions in .R files is the following:

Code: [Select]
/* instruction group 1 */
/* conditional instruction -- bit 15 is set */
/* instruction = (opcode >> 13) */

100x xxxx xxxx xxxx     IF_OP = 4
101x xxxx xxxx xxxx     IF_BITS = 5
110x xxxx xxxx xxxx     ICASE_OP = 6
111x xxxx xxxx xxxx     ICASE_BITS = 7

/* instruction group 2 */
/* transfer/output instruction -- bit 14 is set */
/* instruction = (opcode >> 12) */

0100 xxxx xxxx xxxx     IGO_TO = 4
0101 xxxx xxxx xxxx     ICALL = 5
0110 xxxx xxxx xxxx     ISTR_OUTPUT = 6
0111 xxxx xxxx xxxx     INUM_OUTPUT = 7

/* set immediate instruction -- bit 13 is on */

001x xxxx xxxx xxxx

/* instruction group 3 */
/* math instruction -- bit 12 is on */
/* instruction = (opcode >> 9) */

0001 000x xxxx xxxx     ILOAD_ACC = 8
0001 001x xxxx xxxx     IADD_ACC = 9
0001 010x xxxx xxxx     ISUB_ACC = 10
0001 011x xxxx xxxx     IAND_ACC = 11
0001 100x xxxx xxxx     IOR_ACC = 12
0001 101x xxxx xxxx     IXOR_ACC = 13
0001 110x xxxx xxxx     ITAG_WITH = 14
0001 111x xxxx xxxx     INP_ABS = 15

/* instruction group 4 */
/* single variable instruction -- bit 11 is on */
/* instruction = (opcode >> 9) */

0000 100x xxxx xxxx     ISTORE_MEM = 4
0000 101x xxxx xxxx     INC_MEM = 5
0000 110x xxxx xxxx     IDEC_MEM = 6
0000 111x xxxx xxxx     INP_ABSQ = 7

/* instruction group 5 */
/* input relative instruction -- bit 10 is on */
/* instruction = (opcode >> 9) */

0000 010x xxxx xxxx     INP_REL = 2
0000 011x xxxx xxxx     INP_RELQ = 3

/* instruction group 6 */
/* single operand instruction -- bit 9 is on */
/* instruction = (opcode >> 6) */

0000 0010 00xx xxxx     IROT_LEFT = 8
0000 0010 01xx xxxx     IROT_RIGHT = 9
0000 0010 10xx xxxx     IEXT_BIT = 10
0000 0010 11xx xxxx     IPOS_ABS = 11
0000 0011 00xx xxxx     IPOS_REL = 12

/* instruction group 7 */
/* implied operand instruction - bits 15-5 off, bit 4 on */

0000 0000 0001 0000     INOP = 16
0000 0000 0001 0001     ICOMP_ACC = 17
0000 0000 0001 0010     ITWOCOMP_ACC = 18
0000 0000 0001 0011     IRETURN = 19
0000 0000 0001 0100     ION_TRACE = 20
0000 0000 0001 0101     IOFF_TRACE = 21
0000 0000 0001 0110     IABORT = 22
0000 0000 0001 0111     IFNOT_MAP = 23
0000 0000 0001 1000     IMARKLINE_O_NA = 24
0000 0000 0001 1001     IMARKLINE_S_NA = 25
0000 0000 0001 1010     IMARKLINE_O_A = 26
0000 0000 0001 1011     IMARKLINE_S_A = 27
0000 0000 0001 1100     IMARKSTATE_DISP = 28
0000 0000 0001 1101     IMARKSTATE_SUP = 29
0000 0000 0001 1110     INEWLINE = 30
0000 0000 0001 1111     IFETCH_POSITION = 31
 

Offline deanclaxton

  • Regular Contributor
  • *
  • Posts: 88
  • Country: au
Re: HP Logic Analyzer Inverse Assemblers
« Reply #44 on: May 06, 2020, 11:34:41 pm »
Fascinating thread - very good info. I was given a HP 16602A logic analyser which has a SCSI-SD card setup inside - I believe the previous owner has reinstalled the OS etc.

I now have to work out how to get it up and running, and am very interested in the inverse assemblers - especially for 6502, Z80, and 68000. I've seen some adapter boards that someone has done (http://pcbjunkie.net/index.php/2017/04/29/hp-agilent-logic-analyzer-adapters/) to make the whole setup easier - plug the 40 pin cables direct into the adapters. I've sent the fellow an email to see whether boards or gerbers are available.

A quick question for anyone who has one of these logic analysers - what is the best way to access the display? It doesnt have an inbuilt one so either external monitor or via some remote protocol - I guess external monitor is easier.

I'm not sure what optional licenses it has installed (if any) - are these still available? The link in the thread goes to Yahoo Groups which is on the way out.

Anyways - very keen to find out if this HP16602A that I have will be useful for debugging vintage computers (assuming I can work out how to get it all up and running!). Also keen to look at any upgrades for it - a scope module might be handy for example.
 
The following users thanked this post: oPossum

Offline TK

  • Super Contributor
  • ***
  • Posts: 1497
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: HP Logic Analyzer Inverse Assemblers
« Reply #45 on: May 07, 2020, 12:06:49 am »
Fascinating thread - very good info. I was given a HP 16602A logic analyser which has a SCSI-SD card setup inside - I believe the previous owner has reinstalled the OS etc.

I now have to work out how to get it up and running, and am very interested in the inverse assemblers - especially for 6502, Z80, and 68000. I've seen some adapter boards that someone has done (http://pcbjunkie.net/index.php/2017/04/29/hp-agilent-logic-analyzer-adapters/) to make the whole setup easier - plug the 40 pin cables direct into the adapters. I've sent the fellow an email to see whether boards or gerbers are available.

A quick question for anyone who has one of these logic analysers - what is the best way to access the display? It doesnt have an inbuilt one so either external monitor or via some remote protocol - I guess external monitor is easier.

I'm not sure what optional licenses it has installed (if any) - are these still available? The link in the thread goes to Yahoo Groups which is on the way out.

Anyways - very keen to find out if this HP16602A that I have will be useful for debugging vintage computers (assuming I can work out how to get it all up and running!). Also keen to look at any upgrades for it - a scope module might be handy for example.
The adapters look nice but I think they are not designed to match the wiring the inverse assembler expects.  i.e. the original HP 6502 Z80 adapter requires some logic circuitry to simulate delays and also the inverse assembler configuration file expects specific signals in certain pins.  The analyzer operates in state mode and needs to use the clock inputs in the PODs.

EDIT: Z80, not 6502
« Last Edit: May 07, 2020, 12:14:39 pm by TK »
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1497
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: HP Logic Analyzer Inverse Assemblers
« Reply #46 on: May 07, 2020, 12:21:06 am »
Fascinating thread - very good info. I was given a HP 16602A logic analyser which has a SCSI-SD card setup inside - I believe the previous owner has reinstalled the OS etc.

I now have to work out how to get it up and running, and am very interested in the inverse assemblers - especially for 6502, Z80, and 68000. I've seen some adapter boards that someone has done (http://pcbjunkie.net/index.php/2017/04/29/hp-agilent-logic-analyzer-adapters/) to make the whole setup easier - plug the 40 pin cables direct into the adapters. I've sent the fellow an email to see whether boards or gerbers are available.

A quick question for anyone who has one of these logic analysers - what is the best way to access the display? It doesnt have an inbuilt one so either external monitor or via some remote protocol - I guess external monitor is easier.

I'm not sure what optional licenses it has installed (if any) - are these still available? The link in the thread goes to Yahoo Groups which is on the way out.

Anyways - very keen to find out if this HP16602A that I have will be useful for debugging vintage computers (assuming I can work out how to get it all up and running!). Also keen to look at any upgrades for it - a scope module might be handy for example.
Installation guide: https://www.keysight.com/upload/cmc_upload/All/16700710.pdf

It appears to be the HP-UX based analyzer.  You should be able to connect a monitor, keyboard and mouse and connect through X-Windows
 
The following users thanked this post: deanclaxton

Offline deanclaxton

  • Regular Contributor
  • *
  • Posts: 88
  • Country: au
Re: HP Logic Analyzer Inverse Assemblers
« Reply #47 on: May 07, 2020, 04:46:28 am »
Ok thanks - from memory I had trouble finding a PS2 mouse that would work with it. Is there anything special about the mouse that would have shipped with the unit originally?

Oh - in regard to the 6502 adapter - is there a schematic available? Or does anyone have one that can be reverse engineered? I'm happy to throw a board together once I know what logic is required. I'll check the config files that have been generated for the pin info.

Trying to find an original 6502 adapter would be pretty tough going I expect.

EDIT : It appears that there is no 6502 inverse assembler within the uploaded files - is it still available somewhere?
« Last Edit: May 07, 2020, 05:39:21 am by deanclaxton »
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1497
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: HP Logic Analyzer Inverse Assemblers
« Reply #48 on: May 07, 2020, 12:22:02 pm »
Ok thanks - from memory I had trouble finding a PS2 mouse that would work with it. Is there anything special about the mouse that would have shipped with the unit originally?

Oh - in regard to the 6502 adapter - is there a schematic available? Or does anyone have one that can be reverse engineered? I'm happy to throw a board together once I know what logic is required. I'll check the config files that have been generated for the pin info.

Trying to find an original 6502 adapter would be pretty tough going I expect.

EDIT : It appears that there is no 6502 inverse assembler within the uploaded files - is it still available somewhere?
Sorry, the adapter information was for the Z80: https://www.eevblog.com/forum/testgear/older-logic-analyzer-question/msg1206485/#msg1206485

The 6502 inverse assembler was written by someone else and it was made available through download.  Source files:https://stardot.org.uk/forums/viewtopic.php?t=11043
 
The following users thanked this post: deanclaxton

Offline MarkL

  • Supporter
  • ****
  • Posts: 1648
  • Country: us
Re: HP Logic Analyzer Inverse Assemblers
« Reply #49 on: May 07, 2020, 01:39:03 pm »
Ok thanks - from memory I had trouble finding a PS2 mouse that would work with it. Is there anything special about the mouse that would have shipped with the unit originally?
...
It sounds like you might have the "missing pullup resistor" problem, the same as the 167xx series:

  https://www.eevblog.com/forum/testgear/hp-16702a-mouse/msg374967/#msg374967

Sometimes non-Agilent keyboards and mice work, sometimes they don't.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf