;@ ins k
;@ outs k k k k k
opcode sw14, 0, kkkkkk
  kSw, kin,ko1,ko2,ko3,ko4,kctrl xin
  kSw[][] init 4,4
  kSw fillarray 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
  kIn zkr kin

  zkw kIn*kSw[kSel][0], ko1
  zkw kIn*kSw[kSel][1], ko2
  zkw kIn*kSw[kSel][2], ko3
  zkw kIn*kSw[kSel][3], ko4
  zkw kSw/4,  kctrl
endop

;@ ins a
;@ outs a a a a k
opcode sw14, 0, kkkkkk
  kSw, kin,ko1,ko2,ko3,ko4,kctrl xin
  kSw[][] init 4,4
  kSw fillarray 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
  aIn zar kin

  zaw aIn*kSw[kSel][0], ko1
  zaw aIn*kSw[kSel][1], ko2
  zaw aIn*kSw[kSel][2], ko3
  zaw aIn*kSw[kSel][3], ko4
  zkw kSw/4,  kctrl
endop
