implement "lds" for objects (buffers, cin)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
(
|
||||
(mkbf r0 "Lazy fox\n")
|
||||
(lds @cout @r0) ; buffers implement lds as a non-consuming read from start to end
|
||||
(lds @cout @r0)
|
||||
(lds @cout @r0)
|
||||
(halt)
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
(
|
||||
; Read all stdin and print it reversed
|
||||
(mkbf r0)
|
||||
(lds @r0 @cin) ; cin implements the "lds" operation
|
||||
(bfrev @r0)
|
||||
(lds @cout @r0)
|
||||
(del @r0)
|
||||
)
|
||||
Reference in New Issue
Block a user