DOS commands via IEC commands #511
Replies: 10 comments 1 reply
-
The whole tomato. require io
code listen ( dv -- )
here 1+
$ffff stx, \ dummy address
lsb lda,x \ one byte more but faster
$ffb1 jsr, \ listen
here 1+ swap ! \ actual address
$00 ldx,# inx, \ dummy byte
;code
code second ( sa -- )
here 1+
$ffff stx,
lsb lda,x
$ff93 jsr, \ second
here 1+ swap !
$00 ldx,# inx,
;code
code talk ( dv -- )
here 1+
$ffff stx,
lsb lda,x
$ffb4 jsr, \ talk
here 1+ swap !
$00 ldx,# inx,
;code
code tksa ( sa -- )
here 1+
$ffff stx,
lsb lda,x
$ff96 jsr, \ tksa
here 1+ swap !
$00 ldx,# inx,
;code
code unlisten ( -- )
here 1+
$ffff stx,
$ffae jsr,
here 1+ swap !
$00 ldx,#
;code
code untalk ( -- )
here 1+
$ffff stx,
$ffab jsr,
here 1+ swap !
$00 ldx,#
;code
code ciout ( chr -- )
here 1+
$ffff stx,
lsb lda,x
$ffa8 jsr, \ c
here 1+ swap !
$00 ldx,# inx,
;code
code acptr ( -- chr )
dex, w stx, 0 lda,# msb sta,x
$ffa5 jsr, \ acptr
w ldx, lsb sta,x
;code
: iqt readst ioabort ;
: tfname
over + swap do
i c@ ciout loop ;
: send-cmd ( addr len -- )
0 $90 c!
$ba c@ listen iqt
$ff second iqt
?dup if tfname then
unlisten iqt
$ba c@ talk iqt
$6f tksa iqt
acptr readst begin
0= while emit
acptr readst repeat
emit untalk cr ;
: dos source >in @ /string
dup >in +! \ consume buffer
send-cmd ;
|
Beta Was this translation helpful? Give feedback.
-
Fascinating!
fre 27 jan. 2023 kl. 09:09 skrev Whammo ***@***.***>:
… The whole tomato.
require io
code listen ( dv -- )
here 1+
$ffff stx, \ dummy address
lsb lda,x \ one byte more but faster
$ffb1 jsr, \ listen
here 1+ swap ! \ actual address$00 ldx,# inx, \ dummy byte
;code
code second ( sa -- )
here 1+
$ffff stx,
lsb lda,x
$ff93 jsr, \ second
here 1+ swap !$00 ldx,# inx,
;code
code talk ( dv -- )
here 1+
$ffff stx,
lsb lda,x
$ffb4 jsr, \ talk
here 1+ swap !$00 ldx,# inx,
;code
code tksa ( sa -- )
here 1+
$ffff stx,
lsb lda,x
$ff96 jsr, \ tksa
here 1+ swap !$00 ldx,# inx,
;code
code unlisten ( -- )
here 1+
$ffff stx,
$ffae jsr,
here 1+ swap ! $00 ldx,#
;code
code untalk ( -- )
here 1+
$ffff stx,
$ffab jsr,
here 1+ swap ! $00 ldx,#
;code
code ciout ( chr -- )
here 1+
$ffff stx,
lsb lda,x
$ffa8 jsr, \ c
here 1+ swap ! $00 ldx,# inx,
;code
code acptr ( -- chr )
dex, w stx, 0 lda,# msb sta,x
$ffa5 jsr, \ acptr
w ldx, lsb sta,x
;code
: iqt readst ioabort ;
: tfname
over + swap doi c@ ciout loop ;
: send-cmd ( addr len -- )0 $90 c!
$ba c@ listen iqt
$ff second iqt
?dup if tfname then
unlisten iqt
$ba c@ talk iqt$6f tksa iqt
acptr readst begin
0= while emit
acptr readst repeat
emit untalk cr ;
: dos source >in @ /string
dup >in +! \ consume buffer
send-cmd ;
—
Reply to this email directly, view it on GitHub
<#511 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O6FFMMQQRVOJPX4IDDWUN7E5ANCNFSM6AAAAAAT4U2CAE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
It is fascinating that the protocol is already from the 60s. That is a long
time ago.
It is an interesting thought, that the protocol could be inspired by
military commands. Sounds pretty likely to me. It would be nice to know
more about who designed the protocol. Maybe that is forgotten by now.
lör 28 jan. 2023 kl. 21:46 skrev Whammo ***@***.***>:
… IEC commands are like military drill commands.
TALK and LISTEN are the preparatory commands.
SECOND and TKSA are the commands of execution.
ACPTR and CIOUT are calling cadence, and
UNTALK and UNLISTEN can be at ease or halt.
—
Reply to this email directly, view it on GitHub
<#511 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34OYDPH4AJ7S2LLQWUXTWUWAS3ANCNFSM6AAAAAAT4U2CAE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
This standard 'bus', permitting Programming the PET/CBM -374- 74: Effective 6502 programming |
Beta Was this translation helpful? Give feedback.
-
Wikipedia informs that IEEE-488 started in late 60s as HP-IB,
Hewlett-Packard Internal Bus.
Regarding military connection. Hewlett served in the army during WWII.
Packard was the Deputy Secretary of Defense during the Nixon
administration. So I guess it is natural that the protocol follows that way
of communication :-)
lör 28 jan. 2023 kl. 22:18 skrev Whammo ***@***.***>:
… This standard 'bus', permitting
interchange of data between devices, is described in the IEEE document
IEEE-488,
published in 1978 and itself based on a 1975 standard.
Programming the PET/CBM -374- 74: Effective 6502 programming
—
Reply to this email directly, view it on GitHub
<#511 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O5WTW6W7PZ4AFVMIS3WUWELVANCNFSM6AAAAAAT4U2CAE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
That's Compute's books for you. This is a reliable source. |
Beta Was this translation helpful? Give feedback.
-
The trick, is to whack at the CIA with forth, implement '8 simple commands', and bye bye Kernal, hello free zero page. 😃 |
Beta Was this translation helpful? Give feedback.
-
What a great article! It makes me want to use IEEE-488 instead of USB or
Ethernet.
lör 28 jan. 2023 kl. 23:13 skrev Whammo ***@***.***>:
… The trick, is to whack at the CIA with forth, implement '8 simple
commands', and bye bye Kernal, hello free zero page. 😃
—
Reply to this email directly, view it on GitHub
<#511 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAY34O5OTEVLAHFWCWJTHM3WUWKXLANCNFSM6AAAAAAT4U2CAE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Indeed, IEEE-488 can do spooling.
Tell a USB stick to print without host.
|
Beta Was this translation helpful? Give feedback.
-
It's all relative. Hard pins, or packet headers, out-of-band or in-band handshaking. Serial IEC has done away with either of those. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions