@@ -25,7 +25,7 @@ pub use config::Config as OsConfig;
2525// ===========================================================================
2626
2727/// The OS version string
28- const OS_VERSION : & str = concat ! ( "Neotron OS, version " , env!( "OS_VERSION" ) ) ;
28+ const OS_VERSION : & str = concat ! ( "Neotron OS, v " , env!( "OS_VERSION" ) ) ;
2929
3030/// Used to convert between POSIX epoch (for `chrono`) and Neotron epoch (for BIOS APIs).
3131const SECONDS_BETWEEN_UNIX_AND_NEOTRON_EPOCH : i64 = 946684800 ;
@@ -136,7 +136,7 @@ struct SerialConsole(u8);
136136impl SerialConsole {
137137 fn write_bstr ( & mut self , data : & [ u8 ] ) -> core:: fmt:: Result {
138138 let api = API . get ( ) ;
139- let is_panic = IS_PANIC . load ( Ordering :: SeqCst ) ;
139+ let is_panic = IS_PANIC . load ( Ordering :: Relaxed ) ;
140140 let res = ( api. serial_write ) (
141141 // Which port
142142 self . 0 ,
@@ -155,7 +155,7 @@ impl SerialConsole {
155155impl core:: fmt:: Write for SerialConsole {
156156 fn write_str ( & mut self , data : & str ) -> core:: fmt:: Result {
157157 let api = API . get ( ) ;
158- let is_panic = IS_PANIC . load ( Ordering :: SeqCst ) ;
158+ let is_panic = IS_PANIC . load ( Ordering :: Relaxed ) ;
159159 let res = ( api. serial_write ) (
160160 // Which port
161161 self . 0 ,
@@ -252,7 +252,7 @@ pub extern "C" fn os_main(api: &bios::Api) -> ! {
252252 unsafe {
253253 VGA_CONSOLE = Some ( vga) ;
254254 }
255- println ! ( "Configured VGA console {}x{}" , width, height) ;
255+ println ! ( "\u{001b} [0mConfigured VGA console {}x{}" , width, height) ;
256256 }
257257 }
258258
@@ -263,8 +263,8 @@ pub extern "C" fn os_main(api: &bios::Api) -> ! {
263263 }
264264
265265 // Now we can call println!
266- println ! ( "Welcome to {}! " , OS_VERSION ) ;
267- println ! ( "Copyright © Jonathan 'theJPster' Pallant and the Neotron Developers, 2022" ) ;
266+ println ! ( "\u{001b} [44;33;1m{} \u{001b} [0m " , OS_VERSION ) ;
267+ println ! ( "\u{001b} [41;37;1mCopyright © Jonathan 'theJPster' Pallant and the Neotron Developers, 2022\u{001b} [0m " ) ;
268268
269269 let ( tpa_start, tpa_size) = match ( api. memory_get_region ) ( 0 ) {
270270 bios:: FfiOption :: None => {
@@ -295,11 +295,14 @@ pub extern "C" fn os_main(api: &bios::Api) -> ! {
295295 } ;
296296
297297 println ! (
298- "TPA : {} bytes @ {:p}" ,
298+ "\u{001b} [7mTPA : {} bytes @ {:p}\u{001b} [0m " ,
299299 ctx. tpa. as_slice_u8( ) . len( ) ,
300300 ctx. tpa. as_slice_u8( ) . as_ptr( )
301301 ) ;
302302
303+ // Show the cursor
304+ print ! ( "\u{001b} [?25h" ) ;
305+
303306 let mut buffer = [ 0u8 ; 256 ] ;
304307 let mut menu = menu:: Runner :: new ( & commands:: OS_MENU , & mut buffer, ctx) ;
305308
@@ -376,7 +379,7 @@ pub extern "C" fn os_main(api: &bios::Api) -> ! {
376379#[ panic_handler]
377380#[ cfg( not( feature = "lib-mode" ) ) ]
378381fn panic ( info : & core:: panic:: PanicInfo ) -> ! {
379- IS_PANIC . store ( true , Ordering :: SeqCst ) ;
382+ IS_PANIC . store ( true , Ordering :: Relaxed ) ;
380383 println ! ( "PANIC!\n {:#?}" , info) ;
381384 let api = API . get ( ) ;
382385 loop {
0 commit comments