;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; ;; This file is part of 'M', a MIPS system emulator. ;; ;; ;; ;; (C) 2019 Stanislav Datskovskiy ( www.loper-os.org ) ;; ;; http://wot.deedbot.org/17215D118B7239507FAFED98B98228A001ABFFC7.html ;; ;; ;; ;; You do not have, nor can you ever acquire the right to use, copy or ;; ;; distribute this software ; Should you use this software for any purpose, ;; ;; or copy and distribute it to anyone or in any manner, you are breaking ;; ;; the laws of whatever soi-disant jurisdiction, and you promise to ;; ;; continue doing so for the indefinite future. In any case, please ;; ;; always : read and understand any software ; verify any PGP signatures ;; ;; that you use - for any purpose. ;; ;; ;; ;; See also http://trilema.com/2015/a-new-software-licensing-paradigm . ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; TODO: 'warm boot' command. Right now, 'shutdown' is the only supported cmd. ;;;;;;;;;;;;;;;;;;;;;;;;; ;; Power Supply Device ;; ;;;;;;;;;;;;;;;;;;;;;;;;; ;----------------------------------------------------------------------------- ;; Power Supply: DECLARE_BUS_DEVICE POWER, 0x410, 0x410 ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- %define POWER_CMD_SHUTDOWN 0x01 ; 'Power off' immediately. ;----------------------------------------------------------------------------- ;----------------------------------------------------------------------------- _PD_Read_Word_POWER: ; Word reads from POWER: always 0 xor eax, eax ret ; Fin. ;----------------------------------------------------------------------------- _PD_Write_Word_POWER: ; Word writes to POWER do nothing! ret ;----------------------------------------------------------------------------- _PD_Read_Byte_POWER: xor eax, eax ; Read Byte from POWER: always 0 ret ;----------------------------------------------------------------------------- _PD_Write_Byte_POWER: cmp dl, 1 ; 1 == shutdown jne _PD_Write_Byte_POWER_No_Shutdown ; if != 1, do not shut down Flg_On Shutdown ; Set the Shutdown flag. _PD_Write_Byte_POWER_No_Shutdown: ret ; Fin. ;----------------------------------------------------------------------------- _Device_Init_POWER: ; No init needed ret ;----------------------------------------------------------------------------- _Device_Shutdown_POWER: ; Nothing needed ret ;-----------------------------------------------------------------------------