x86-16
Displaying Time in Assembly
See the x86 tag wiki for the instruction set reference manual, and many good links to reference material and tutorials. It takes enough code to split up an integer into ASCII digits that you should factor it out into a function. This is an optimized and bugfixed version of @hobbs’s print2Digits function. (I also bugfixed … Read more
What is the best way to move an object on the screen?
OK, I finally got TASM+TLINK to work with Windows 7 x64 … (VirtualPC is not working properly any more :() So here is one simple Tunnelers-like game for three players in TASM tiny model (*.com). It is unfinished (I moved to NASM at that time), but you can redefine keys, and move the cars with … Read more
Assembly 8086 | Sum of an array, printing multi-digit numbers
With the correction for the add to be replaced by mov as noted in your comment (Note that the line: add al, [bx] is actually mov al, [bx]) there’s just the function call at the label EndLoop that’s wrong! You want to display the sum, and are using the DOS print function. This function 09h … Read more
How buffered input works
Looking at how you defined your input buffer (buf: db 20 dup (‘$’)), I get it that you want to cut corners and have the input already $-terminated ready for re-displaying it. Sadly this messes up the required settings for the DOS input function 0Ah and your program is in serious problems with a potential … Read more
Displaying numbers with DOS
It’s true that DOS doesn’t offer us a function to output a number directly. You’ll have to first convert the number yourself and then have DOS display it using one of the text output functions. Displaying the unsigned 16-bit number held in AX When tackling the problem of converting a number, it helps to see … Read more
Boot loader doesn’t jump to kernel code
The primary problems with this code were: ES:BX was pointing to the wrong segment:offset to load the kernel into Wrong sector was being loaded so kernel wasn’t what was expected The first one was in this code: mov bx,0x7E00 mov es,bx xor bx,bx The question wants to load the sector from disk to 0x0000:0x7E00(ES:BX). This … Read more