MAIN START   ; <---***---
  CALL REVN
  RET
;B DC #557
  END
;１０語の 語の並び と
;ビット列を逆転する｡
;----------------------
REVN START  ; <---***---
  LAD GR1,0
  LAD GR6,9
LP LD GR0,TBL,GR1
  CALL REVERS
  ST GR0,REV,GR6
  LAD GR1,1,GR1
  LAD GR6,-1,GR6
  CPA GR6,=0
  JMI FIN
  LD GR0,TBL,GR1
  JUMP LP
FIN RET
TBL DC #7FFF,#8000,#F7A3
    DC #16C9,4079,8877
    DC 5566,3333,2222
    ;DC 1111 ,7788 ;RHINO ;S. YAMASE
REV DS 10
   END
;------------------
REVERS START  ; <---***---
  PUSH 0,GR1
  PUSH 0,GR2
  PUSH 0,GR5
  PUSH 0,GR6
;  LD GR0,MAE
;  ST GR0,MAE
  LAD GR6,0
  LAD GR3,16
LP SRL GR0,0
  JZE FIN
  LAD GR3,-1,GR3
  SLL GR6,1
  SRL GR0,1
  JOV ONE
  JUMP LP
ONE OR GR6,=1
  JUMP LP
FIN SLL GR6,0,GR3
  LD GR0,GR6
  ST GR0,ATO
  POP GR6
  POP GR5
  POP GR2
  POP GR1
  RET
 DC #9368
ATO DS 1
  END
