波浪线看起来像决定堆栈使用的数据。您可能会发现回忆 pdp-11 使用 16 位整数以及 DEC 更喜欢八进制数而不是十六进制数会很有帮助。
那
jsr r5, csv
是一种使寄存器 5 (r5) 指向某些数据(可能是偏移量列表)的方法。
这些数字对应于八进制堆栈上的偏移量。假设调用者做类似的事情
- 将 a 和 b 压入堆栈(正偏移)
- 将返回地址压入堆栈(偏移量=0)
- 可能会在
csv
函数中推送其他内容
- c 和 d 是局部变量(负偏移,因此是“17777x”)
那条线
~d=177776
看起来很奇怪 - 我希望
~d=177766
因为它应该c
在堆栈的下方。寄存器操作数中的-10
和-12
偏移量看起来也是八进制数。您应该能够根据上下文将偏移量与变量匹配。
这只是一个有根据的猜测:我在text-editor中改编了 jsr+r5 习语。
带有波浪线的线是符号定义。DECUS C Compiler Reference中有一个线索,位于
ftp://ftp.update.uu.se/pub/pdp11/rsx/lang/decusc/2.19/005003/CC.DOC
它说
3.3 Global Symbols Containing Radix-50 '$' and '.'
______ _______ __________ ________ ___
With this version of Decus C, it is possible to generate and
access global symbols which contain the Radix-50 '.' and '$'.
The compiler allows identifiers to contain the Ascii '$', which
becomes a Radix-50 '$' in the object code. The AS assembly code
shows this character as a tilde (~). The underscore character
(_) in a C program becomes a '.' in both the AS assembly
language and in the object code. This allows C programs to
access all global symbols:
extern int $dsw;
. . .
printf("Directive status = %06o\n", $dsw);
The above prints the current contents of the task's directive
status word.
所以你可以阅读
~a=4
作为
$a=4
并且看到这$a
是一个(或多或少)传统符号。