114 words
1 minutes
SCSC2026 Quals - ASM 101 - General Skills Writeup

Category: General Skills
File: source.nasm
Flag: scsc26{02_02_1c00_001c}

Challenge Description#

Given a 16-bit DOS assembly program. Inputs are:

  • input1 = 20
  • input2 = 200

Flag format:

scsc26{mem[001E]_mem[001F]_DX_BX}

Analysis#

At a high level, the program:

  • Reads 2 inputs using DOS int 21h function AH=0Ah (buffered input).
  • Copies input into number3 and number4 from the back (uses STD + LODSB/STOSB) to right-align digits (4-digit style).
  • Treats filler bytes as empty, effectively as 0.
  • Takes 4 digits from each number, converts ASCII '0'..'9' to numeric 0..9.
  • Adds digit-by-digit with carry and stores a 5-digit result into memory 0x001C..0x0020.

With right-alignment:

  • 20 becomes 0020
  • 200 becomes 0200
  • Sum = 00220

Solution#

Because the result is stored as digits:

  • mem[001E] (hundreds digit) = 02
  • mem[001F] (tens digit) = 02

At the end of the loop:

  • DX = 1c00 (DH=1C, DL=00)
  • BX = 001c

So the flag is:

scsc26{02_02_1c00_001c}

SCSC2026 Quals - ASM 101 - General Skills Writeup
https://blog.rei.my.id/posts/14/scsc2026-quals-asm-101-general-skills-writeup/
Author
Reidho Satria
Published at
2026-02-17
License
CC BY-NC-SA 4.0