Only barely has something to do with Halloween!
Written in FASM, includes text, palette rotation and exit logic. Without those it's 97b. I'll put the source up on \asm because why not. Works in DOSBox but that's about all I tried. I'm going on some assumptions about initial register states that may cause it to blow up elsewhere lol