Created
May 31, 2014 17:48
-
-
Save spiiin/88f80daaac6ab6bf5822 to your computer and use it in GitHub Desktop.
Логгирование архивов
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "binio" | |
| local time, cnt | |
| time = 0 | |
| cnt = 1 | |
| memory.registerexec(0xCFC2, function() | |
| log = io.open ("data1.log", "a"); | |
| local pr = string.format("addr: %02X:%02X%02X to:%02X%02X\n", memory.readbyte(0x69), memory.readbyte(0x68),memory.readbyte(0x67), memory.readbyte(0x6B), memory.readbyte(0x6A)) | |
| log:write(pr) | |
| log:close() | |
| print(pr) | |
| if os.clock() - time > 4 then | |
| cnt = cnt + 1 | |
| log = io.open ("data1.log", "a"); | |
| log:write(string.format("\n(%03d)----\n", cnt)) | |
| print("----") | |
| log:close() | |
| end | |
| time = os.clock() | |
| end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment