Skip to content

Instantly share code, notes, and snippets.

@FiXato
Last active May 12, 2021 11:11
Show Gist options
  • Save FiXato/c0bdb9352d1eee4fa57d6ab68e80476d to your computer and use it in GitHub Desktop.
Save FiXato/c0bdb9352d1eee4fa57d6ab68e80476d to your computer and use it in GitHub Desktop.
An openMSX TCL script to copy the contents of the current LISTing to your clipboard. Just dump this in your profile's openMSX/share/scripts directory and you can use the copy_ascii_listing_to_clipboard command
namespace eval listing_manipulation {
proc strip_memory_addresses {str} {
return [regsub -all -line {^[0-9a-f]x[0-9a-f]{4} > } $str ""]
}
proc copy_ascii_listing_to_clipboard {} {
set_clipboard_text [strip_memory_addresses [listing]]
}
namespace export copy_ascii_listing_to_clipboard
}
namespace import listing_manipulation::*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment