r/tinycode • • Sep 24 '15

Maze Generator in 8 Bytes (MSDOS)

http://www.pouet.net/prod.php?which=65290
32 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/lukz Oct 12 '15 edited Oct 12 '15

I'm not really good at this assembly, but would like to understand more. What is the advantage of doing salc and then add al,0xDF instead of adc al,0xDE? I guess that would also use carry and you would end up with two values one apart?

Edit: I eventually figured it out. You need to set al to some known value first, then add 0xdf. Clever.