--- nono/exp/ptest1.has 2026/04/29 17:05:16 1.1 +++ nono/exp/ptest1.has 2026/04/29 17:05:59 1.1.1.2 @@ -551,7 +551,7 @@ print_ptest: ; out d0: 一致すれば 0、そうでなければ 1 を返す ; use -- cmp_mmusr: - movem.l d2/a0,-(sp) + movem.l d2-d3/a0-a1,-(sp) moveq.l #0,d0 lea.l mmusr_buf(pc),a0 pmove mmusr,(a0) @@ -564,16 +564,45 @@ cmp_mmusr: move.w d1,d0 swap d0 bsr hexstr_word + bsr put_mmusrbits move.l #((' '<<24)|('b'<<16)|('u'<<8)|'t'),(a0)+ move.b #' ',(a0)+ move.w d2,d0 swap d0 bsr hexstr_word + bsr put_mmusrbits move.b #0,(a0) PRINT buf(pc) moveq.l #1,d0 cmp_mmusr_done: - movem.l (sp)+,d2/a0 + movem.l (sp)+,d2-d3/a0-a1 + rts + +; in d0.hw: MMUSR +; a0 : バッファアドレス +; use d3 +; a1 +put_mmusrbits: + lea.l mmusr_str(pc),a1 + move.b #'(',(a0)+ + +BITSTR .macro BIT, OFFSET + clr.w d3 + btst.l #(16+BIT),d0 + seq d3 + neg.b d3 + move.b OFFSET(a1,d3.w*1),(a0)+ + .endm + + BITSTR 15, 0 ; B + BITSTR 14, 2 ; L + BITSTR 13, 4 ; S + BITSTR 11, 6 ; W + BITSTR 10, 8 ; I + BITSTR 9, 10 ; M + BITSTR 6, 12 ; T + + move.b #')',(a0)+ rts ; アドレスをパラメータセットのアドレスインデックスと比較する。 @@ -651,6 +680,8 @@ msg_mmusr1: .dc.b ": MMUSR expects ",0 msg_an: .dc.b ": An expects ",0 +mmusr_str: + .dc.b "B-L-S-W-I-M-T-" .bss .even