VLIST example for CDS.BP BOB
0001 X = 1:@VM:2
0002 *
0003 FOR V = 1 TO DCOUNT( X, @VM )
0004 CRT X<1,V>
0005 NEXT V
0006 *
0007 MAXV = DCOUNT( X, @VM )
0008 FOR V = 1 TO MAXV
0009 CRT X<1,V>
0010 NEXT V
It reads a lot like any assembler I've ever read.
The general format of each line is:
The 1st number is source line number
The 2nd number is an object hex address (This is the address PORT.STATUS command shows.)
Then comes the instruction, followed by operands.
>VLIST CDS.BP BOB
00001: X = 1:@VM:2
00001 00000 : 104 multi_cat 1 "ý" 2 => X
00002: *
00003: FOR V = 1 TO DCOUNT( X, @VM )
00003 0000C : 0F8 move 0 => V
00003 00012 : 051 dcount X "ý" => $R0 <--- NEXT V creates a jump back to here. DCOUNT repeats.
00003 0001A : 098 forincr V $R0 1 00040:
00004: CRT X<1,V>
00004 00028 : 060 dyn_extract X 1 V 0 => $R0
00004 00034 : 046 crtcrlf $R0
00005: NEXT V
00005 0003A : 0C2 jump 00012:
00006: *
00007: MAXV = DCOUNT( X, @VM )
00007 00040 : 051 dcount X "ý" => MAXV
00008: FOR V = 1 TO MAXV
00008 00048 : 0F8 move 0 => V
00008 0004E : 098 forincr V MAXV 1 00074: <--- NEXT V jumps to here. DCOUNT not repeated.
00009: CRT X<1,V>
00009 0005C : 060 dyn_extract X 1 V 0 => $R0
00009 00068 : 046 crtcrlf $R0
00010: NEXT V
00010 0006E : 0C2 jump 0004E:
00011 00074 : 190 stop
>