Skip to content

Commit

Permalink
Revision 1.01
Browse files Browse the repository at this point in the history
License changed to MIT License. Source code clean-up.
  • Loading branch information
adriancable committed Jan 30, 2014
1 parent 38758f3 commit 6135eda
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 20 deletions.
14 changes: 6 additions & 8 deletions 8086tiny.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// 8086tiny: a tiny, highly functional, highly portable PC emulator/VM
// Copyright 2013, Adrian Cable (adrian.cable@gmail.com) - http://www.megalith.co.uk/8086tiny
//
// Revision 1.00
// Revision 1.01
//
// This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
// http://creativecommons.org/licenses/by-sa/3.0/
// This work is licensed under the MIT License. See included LICENSE.TXT.

#include <time.h>
#include <memory.h>

#ifndef _WIN32
#include <unistd.h>
Expand Down Expand Up @@ -135,11 +133,11 @@
// Reinterpretation cast
#define CAST(a) *(a*)&

// Keyboard and timer driver. This will need changing for UNIX/non-UNIX platforms
// Keyboard and timer driver. This may need changing for UNIX/non-UNIX platforms
#ifdef _WIN32
#define KEYBOARD_TIMER_DRIVER (int8_asap = pc_interrupt(8), kbhit()) && (mem[0x4A6] = getch(), pc_interrupt(7));
#define KEYBOARD_TIMER_DRIVER (pc_interrupt(8), int8_asap = 0, kbhit()) && (mem[0x4A6] = getch(), pc_interrupt(7));
#else
#define KEYBOARD_TIMER_DRIVER (int8_asap = read(pc_interrupt(8), mem + 0x4A6, 1)) && pc_interrupt(7)
#define KEYBOARD_TIMER_DRIVER (pc_interrupt(8), int8_asap = 0, read(0, mem + 0x4A6, 1)) && pc_interrupt(7)
#endif

// Global variable definitions
Expand Down Expand Up @@ -640,7 +638,7 @@ int main(int argc, char **argv)
i_reg = i_data0

NEXT_OPCODE_SUBFUNCTION // PUTCHAR_AL
write(1, regs8, 1), fflush(stdout)
write(1, regs8, 1)
NEXT_OPCODE_SUBFUNCTION // GET_RTC
time(disk + 3),
memcpy(mem + SEGREG(REG_ES, REG_BX, ), localtime(disk + 3), sizeof(struct tm))
Expand Down
9 changes: 4 additions & 5 deletions bios_source/bios.asm
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
; BIOS source for 8086tiny IBM PC emulator, a winner of the 2013 IOCCC contest. Compiles with NASM.
; Copyright 2013, Adrian Cable (adrian.cable@gmail.com). All rights reserved.
; BIOS source for 8086tiny IBM PC emulator. Compiles with NASM.
; Copyright 2013, Adrian Cable (adrian.cable@gmail.com) - http://www.megalith.co.uk/8086tiny
;
; Revision 1.10
; Revision 1.11
;
; In accordance with IOCCC norms, this code is licensed under a Creative Commons
; Attribution-ShareAlike 3.0 Unported License. See: http://creativecommons.org/licenses/by-sa/3.0/
; This work is licensed under the MIT License. See included LICENSE.TXT.

cpu 8086

Expand Down
13 changes: 6 additions & 7 deletions docs/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -281,13 +281,12 @@
<a href="&#109;&#97;&#105;&#x6c;&#x74;&#111;&#58;&#x61;&#100;&#114;&#x69;&#97;&#110;&#46;&#99;&#97;&#x62;&#x6c;&#x65;&#x40;&#x67;&#109;&#x61;&#105;&#x6c;&#x2e;&#x63;&#111;&#x6d;">&#x61;&#x64;&#x72;&#x69;&#x61;&#110;&#x2e;&#x63;&#97;&#98;&#x6c;&#x65;&#x40;&#103;&#x6d;&#x61;&#105;&#108;&#x2e;&#x63;&#x6f;&#109;</a><br />
<br>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHLwYJKoZIhvcNAQcEoIIHIDCCBxwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9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PJ37T1gOpRdNF0NsGCX26Wi8KHL8lvreRRsbYecyl7DEcN6TP9cNoKHGzt9+Qrzb33EXc3I1oeP1f5MJIFpqfP2Tqe7SWDMdSUsIHMgKJIZw==-----END PKCS7-----
">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<center><form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHLwYJKoZIhvcNAQcEoIIHIDCCBxwCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYAWElO8FzxSwd1YS/aND7SDIRxBPxU3HBYiETwuclLx4YYoT2HgDJu3CytkTGDUTNHzgFmQ+KMm3Mb1zHlhLGC4PyEziiwvmRBnxXno3BsPMVKOhQhOeb4A0qSZzN2/DIwyUanqHeZqBkXa10d7G6kFvrkbZj5OS/pbGM0XvWPEKjELMAkGBSsOAwIaBQAwgawGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIlXXx20WdjIKAgYh66b5Dy3O+Q9pWJ4DXTSs/ShAQsNQZAbI3DMzRCskbD7qz6j+TOLATd2rnp3CpITejwkq597hVCuoFWNc9qcLzCvrC2DFalCVO/jy4YCmQ9mIps9TSaIX7rkPDuCB8g6hpHveAAlRMXfskNewMs6ZrqO1+Z+geEhqEM50FIZI0I0Q1f3rUw0VnoIIDhzCCA4Mw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DjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTQwMTE0MDE1NDQyWjAjBgkqhkiG9w0BCQQxFgQUI+ZU8XN3EgMpFgUvYwzRoEQo0VwwDQYJKoZIhvcNAQEBBQAEgYBm8abQmL+NkFgnXkv/y9EwtDD8YXaFI2KnvpyzsFKGUfzxL5lkYSr4F/NHp749xFPJ37T1gOpRdNF0NsGCX26Wi8KHL8lvreRRsbYecyl7DEcN6TP9cNoKHGzt9+Qrzb33EXc3I1oeP1f5MJIFpqfP2Tqe7SWDMdSUsIHMgKJIZw==-----END PKCS7-----">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form></center>

</div>
</div>
Expand Down
Binary file modified fd.img
Binary file not shown.
21 changes: 21 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2013-2014 Adrian Cable - http://www.megalith.co.uk/8086tiny

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

0 comments on commit 6135eda

Please sign in to comment.