You have at least three major problems in your code:
8!
is too large to fit intoAL
.- Your printing code only works for numbers up to
9
. You're adding 48 and then printing as a character, which is fine for single-digit, but even for10
it can't work. You need to write a complete section for printing numbers (or maybe use one that your professor provided)? - You are storing the result of your computation in
AL
, but you overwrite it when you domov ax, @Data
.