Skip to main content

Timeline for Make your language unusable

Current License: CC BY-SA 3.0

15 events
when toggle format what by license comment
Nov 5, 2015 at 16:40 comment added Joshua I've been pondering, what would happen if the following code scanned memory to find the routines the IVT is supposed to point to. It can take as much time as it needs (we note that an IVT value of zero causes the CPU to discard the interrupt).
Oct 26, 2015 at 21:57 comment added Blacklight Shining @NateEldredge My understanding is that that requirement is meant to prevent things like exit(0); /* insert code here */. Not all of the inserted code has to execute, and an error can occur as soon as execution starts. The system just has to try to start executing it.
Oct 24, 2015 at 14:15 comment added Ruslan I'd rather go with something like this, not rely on the first instruction executed to not be cli. This of course does have workarounds too (stack-based), but not as straightforward, and can also be circumvented by supervisor.
Oct 22, 2015 at 15:00 comment added Matteo Italia @kirbyfan64sos: yes; this should make a mess on all the calls to DOS and BIOS routines, plus whenever an interrupt (keyboard, timer, ...) is invoked.
Oct 22, 2015 at 14:09 comment added kirbyfan64sos So this clears the interrupt table? (Not a DOS programmer!)
Oct 22, 2015 at 5:54 comment added Matteo Italia @NateEldredge: the rules aren't really clear on this, and if you look around most answers actually consist in modifications to the environment that generate a runtime error of some type on trivial instructions (the JS clear(this);, the memory limit in PHP, the recursion limit in Python, the sandboxed environment in Python and many others), I wouldn't see this as a problem.
Oct 22, 2015 at 5:50 comment added Matteo Italia @JerryCoffin: of course, but any interrupt (I'm thinking keyboard and timer) should quickly break havoc.
Oct 21, 2015 at 20:28 comment added Jerry Coffin At least as it stands, this won't stop a program from writing directly to the screen buffer (which was pretty common under DOS).
Oct 21, 2015 at 19:23 comment added Nate Eldredge I actually thought about something a little similar. But I wondered about that as soon as your code attempts to make its first privileged instruction, system call, etc, you'll get a trap, and then the rest of the code will not in fact execute, which the rules seem to require. Unless you have supervisor code to manually restart at the next instruction - but then I think you have to be able to parse all instructions to determine their length, which is a pain.
Oct 21, 2015 at 19:19 comment added Matteo Italia @NateEldredge: the next step is to jail the rest of the code to ring 3 with no trampoline back to ring 0; I'll see if I manage to put together a working example (another possibility would be to scan the whole address space and NOP-out all the cli (and inp and outp just for good measure), but I don't know if that would be allowed by the rules.
Oct 21, 2015 at 16:22 comment added Nate Eldredge So what if the first instruction of my inserted code is cli, and then I fix the interrupt table, and go on to compute some primes, etc?
Oct 21, 2015 at 14:52 history edited Matteo Italia CC BY-SA 3.0
Forgot xor di,di
Oct 20, 2015 at 12:57 comment added Luminous Sir, if I may interrupt you for a few cycles so I may fini....
Oct 20, 2015 at 12:26 history edited Matteo Italia CC BY-SA 3.0
added 79 characters in body
Oct 20, 2015 at 12:20 history answered Matteo Italia CC BY-SA 3.0