mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
git-svn-id: svn://coreboot.org/openbios/openbios-devel@4 f158a5a8-5612-0410-a976-696ce0be7e32
19 lines
446 B
Forth
19 lines
446 B
Forth
\ -------------------------------------------------------------------------
|
|
\ 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
|
|
;
|