You're currently on: Catalog » Guides » 8051 assembly: a quick start with DOS/51
The 8051 is an 8-bit processor family that works with bytes and individual bits. Assembly lets you tell it exactly what to move, add or test. You can try it immediately in the free DOS/51 browser emulator—no programmer or physical board needed.
MOV A,#42
MOV A,0x30
#
Open DOS/51, type nano first.asm and enter this program. Save with Ctrl-O, leave with Ctrl-X, then type asm -r first.asm.
nano first.asm
asm -r first.asm
clr 0x99 ; TI = 0 mov a,#42 ; ASCII '*' mov 0x99,a ; SBUF wait_tx: jnb 0x99,wait_tx clr 0x99 ret
It prints * and returns to the shell. Byte address 0x99 is the UART transmit buffer SBUF; bit address 0x99 is TI, the transmission-complete flag. The instruction selects the address space. DOS/51 has already configured the UART, so this example does not change the console speed.
*
The Philips P80C31SFPN in DIP-40 is ROMless: it needs external program memory, a clock, reset and address-latch circuitry. The emulator’s external RAM and SD card are board features, not memory or native SPI hidden inside the CPU. For physical construction, see our complete 80C31 breadboard-system guide.
The Ultimate 8051 Assembly Guide covers all 44 standard mnemonics, 111 operand forms and 255 defined opcode bytes, with addressing, flags, stack, examples and peripherals. It distinguishes classic CPU behavior, Philips-specific documentation and features actually modeled by the emulator.
Prefer a retro field manual? New emulator SD cards include the ASCII edition. On an existing card, click Install field manual; existing files are preserved. Read the index with sdget guide51.txt, then cat guide51.txt. Chapters are split to fit the small RAM disk.
sdget guide51.txt
cat guide51.txt
Read the Ultimate 8051 Assembly Guide →
We use cookies to provide you with the best possible experience. They also allow us to analyze user behavior in order to constantly improve the website for you.