summaryrefslogtreecommitdiffstats
path: root/qemu/roms/openbios/drivers/esp.fs
blob: 9e37c0a0ee99c9cdf66063f6c8bbc4363f2fb1ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
\ -------------------------------------------------------------------------
\ SCSI encode/decode unit
\ -------------------------------------------------------------------------

: decode-unit-scsi ( str len -- id lun )
  ascii , left-split
  ( addr-R len-R addr-L len-L )
  parse-hex
  -rot parse-hex
  swap
;

: encode-unit-scsi ( id lun -- str len)
  swap
  pocket tohexstr
  " ," pocket tmpstrcat >r
  rot pocket tohexstr r> tmpstrcat drop
;