File tree Expand file tree Collapse file tree 3 files changed +156
-178
lines changed Expand file tree Collapse file tree 3 files changed +156
-178
lines changed Original file line number Diff line number Diff line change 7
7
</ head >
8
8
< body >
9
9
< div id ="screen "> </ div >
10
- < div id ="serial "> </ div >
10
+ < div id ="terminal0 "> </ div >
11
+ < div id ="terminal1 "> </ div >
11
12
12
13
< button id ="save "> Save state</ button >
13
14
</ body >
Original file line number Diff line number Diff line change @@ -6,12 +6,20 @@ const shell = new LinuxBrowserShell(
6
6
bios : "./v86/seabios.bin" ,
7
7
vga_bios : "./v86/vgabios.bin" ,
8
8
cdrom : "./v86/image.iso" ,
9
- // initial_state: "./v86/initial-state.bin.zst",
9
+ initial_state : "./v86/initial-state.bin.zst" ,
10
10
} ,
11
11
document . getElementById ( "screen" ) ,
12
- document . getElementById ( "serial" ) ,
13
12
)
14
- shell . boot ( )
13
+
14
+ let tty0 = shell . getTerminal ( 0 )
15
+ let tty1 = shell . getTerminal ( 1 )
16
+
17
+ tty0 . attach ( document . getElementById ( "terminal0" ) )
18
+ tty1 . attach ( document . getElementById ( "terminal1" ) )
19
+
20
+ shell . boot ( ) . then ( ( ) => {
21
+ console . log ( "Booted" )
22
+ } )
15
23
16
24
document . getElementById ( "save" ) . onclick = async function ( ) {
17
25
shell . downloadState ( )
You can’t perform that action at this time.
0 commit comments