<jupyter_start><jupyter_text>Exploring our DOS environmentFirst we import our extension and ask it to "pop out."  This will put the dosbox widget itself in a different tab in Jupyterlab, and it'll also add a browser on the left had side for the files in its temporary filesystem.<jupyter_code>import jupyterlab_dosbox, pooch
db = jupyterlab_dosbox.DosboxModel()
db<jupyter_output><empty_output><jupyter_text>Now, let's send over a zip file from the Archive of one of my favorite DOS games, McMurphy's Mansion.<jupyter_code>URL = "https://archive.org/download/msdos_McMurphys_Mansion_1984/McMurphys_Mansion_1984.zip"
SHA256SUM = "ce54f7a42d6513010d6c737465b4ef59c09634de2db3f0b1b0f66963ef3cb98b"
fn = pooch.retrieve(URL, SHA256SUM)
db.send_zip(fn)<jupyter_output><empty_output><jupyter_text>Now let's make it play the game!  You can also browse the file explorer on the left to see what was just unzipped.<jupyter_code>db.send_command("cd mcmurphy")
db.send_command("mcmurphy")<jupyter_output><empty_output><jupyter_text>We can ask Dosbox for a coredump of the main memory.  This should be a snapshot in time when it was accessed; it'll have register info as well as pointers to different areas on the stack.<jupyter_code>db.coredump()<jupyter_output><empty_output><jupyter_text>Let's get a view of it as a `uint8` array...<jupyter_code>db.coredumps[0].memBase
db.coredumps[0].segments_physical<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08011243851018975, 'fraction_numerical': 0.04005621925509487, 'mean_word_length': 7.045197740112994, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '194750', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 553, 'n_tokens_neox': 503, 'n_words': 144, 'path': 'examples/dosbox_coredump.ipynb', 'repo_name': 'matthewturk/jupyterlab_dosbox', 'size': '1423'}