switch.s

来自「UNIX v6源代码 这几乎是最经典的unix版本 unix操作系统设计和莱」· S 代码 · 共 41 行

S
41
字号
/ switch -- switch on contents of r0/// calling sequence --//   jsr r5,switch; swtab// r0 is looked up in swtab and if found/ control is returned to the corresponding place/ if r0 is not found, the next inline instruction is / executed// swtab format --// swtab:/    val1; ret1/   val2; ret2/   .../   valn; retn/   ..; 0/	.globl	switchswitch:	mov	r1,-(sp)	mov	(r5)+,r11:	cmp	r0,(r1)+	beq	1f	tst	(r1)+	bne	1b2:	mov	(sp)+,r1	rts	r51:	mov	(r1)+,r1	beq	2b	mov	r1,r5	br	2b

⌨️ 快捷键说明

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