Add IDENTIFY command to report back version and build date
authorMark Tearle <[email protected]>
Fri, 20 Mar 2015 13:46:33 +0000 (21:46 +0800)
committerMark Tearle <[email protected]>
Fri, 20 Mar 2015 13:52:39 +0000 (21:52 +0800)
ROM2/main_basic.c

index feb5bee..230c5fb 100644 (file)
@@ -354,9 +354,8 @@ void about() {
                return;
        }
        send_string(
-               "------------------------------------------------------------" CRLF
+               CRLF
                " ROM2 (C) 2004 Bernard Blackham <[email protected]>" CRLF
-               "------------------------------------------------------------" CRLF
                " Revision: " VERSION_STRING "  Built: " DATEBUILT_STRING CRLF "" CRLF CRLF
                "   This snack machine was brought to you by " CRLF
                "    Bernard Blackham" CRLF
@@ -405,6 +404,12 @@ void moo() {
        );
 }
 
+void identify() {
+       send_string(
+               "086 ROM " VERSION_STRING " " DATEBUILT_STRING CRLF
+       );
+}
+
 void help() {
        send_string(
                "Valid commands are:" CRLF
@@ -415,6 +420,7 @@ void help() {
                " ECHO {ON|OFF} turn echo on or off" CRLF
                " GETROM        download the ROM source code using xmodem" CRLF
                " H[...]        this help screen" CRLF
+               " IDENTIFY      report ROM version" CRLF
                "*JUMPxxxx      jumps to a subroutine at location xxxx" CRLF
                "*PEEKxxxx      returns the value of the byte at location xxxx" CRLF
                "*POKExxxxyy    sets the value of location xxxx to yy" CRLF
@@ -612,6 +618,9 @@ int main() {
                                case 'H':
                                        help();
                                        break;
+                               case 'I':
+                                       identify();
+                                       break;
                                case 'M':
                                        moo();
                                        break;

UCC git Repository :: git.ucc.asn.au