get interactive shell working
This commit is contained in:
parent
e1c5c6d679
commit
3a8d170f05
12
term.py
12
term.py
|
@ -15,20 +15,18 @@ def run(args):
|
|||
def main():
|
||||
args = sys.argv[1:]
|
||||
if len(args) < 2:
|
||||
print('usage: %s ROM SHELL')
|
||||
print('usage: %s ROM SHELL [ ARGS... ]')
|
||||
print('')
|
||||
print('execute the given uxn terminal program (ROM)')
|
||||
print('and start a shell process (SHELL).')
|
||||
print('and start a shell process (SHELL + ARGS).')
|
||||
print('')
|
||||
print('example: %s term.rom /bin/bash' % sys.argv[0])
|
||||
print('example: %s term.rom /bin/bash -i' % sys.argv[0])
|
||||
sys.exit(1)
|
||||
rom = args[0]
|
||||
shell = args[1]
|
||||
|
||||
term = run(['uxnemu', rom])
|
||||
term = run(['uxnemu', args[0]])
|
||||
term_out = term.stdout.fileno()
|
||||
|
||||
shell = run([shell])
|
||||
shell = run(args[1:])
|
||||
shell_out = shell.stdout.fileno()
|
||||
|
||||
while shell.poll() is None and term.poll() is None:
|
||||
|
|
11
term.tal
11
term.tal
|
@ -27,9 +27,9 @@
|
|||
.cols LDZ2 #30 SFT2 .Screen/w DEO2
|
||||
|
||||
( set colors )
|
||||
#08f3 .System/r DEO2
|
||||
#0cd5 .System/g DEO2
|
||||
#0b66 .System/b DEO2
|
||||
#0ff0 .System/r DEO2
|
||||
#0f88 .System/g DEO2
|
||||
#0f0f .System/b DEO2
|
||||
|
||||
( set pos, subinput flag )
|
||||
.buffer .pos STZ
|
||||
|
@ -87,7 +87,10 @@
|
|||
.tint STZ JMP2r
|
||||
|
||||
@show-cursor
|
||||
;draw-cursor JMP2
|
||||
.tint LDZ
|
||||
#44 .tint STZ
|
||||
;draw-cursor JSR2
|
||||
.tint STZ JMP2r
|
||||
|
||||
@draw-cursor
|
||||
.cur-x LDZ2 #30 SFT2 .Screen/x DEO2
|
||||
|
|
Loading…
Reference in New Issue