tasm

I don't understand how to use Interrupt 21, AH=0ah

▼魔方 西西 提交于 2019-11-27 09:29:19
My information is coming from here . The assignment asks for a program that reads in no more than 20 characters, converts those characters to upper case, and then prints the input as capitals. I have no idea how to access the input from int21/AH=0ah. I really can't ask a more precise question unless I understand what is linked above. Can someone explain? Also, I'm using TASM if that makes any difference. Also, I'm testing this on freedos. UPDATE1: Alright, thanks to your help, I believe I understand how the interrupt needs to be set up and behaves. Setup: I have to designate a ds:dx where I

How to convert string to number in Tasm?

好久不见. 提交于 2019-11-27 08:41:43
问题 I made a program that reads a string and converts it into a number. A string representation of the number entered in the decimal system. The result of of converting is in register ax. I use tasm16. How do I do that I can convert a string bigger(more than 65535)? model small stack 100h printstring macro msg mov ah,09h mov dx,offset msg int 21h endm data segment cr equ 0dh lf equ 0ah errorInput db 'Wrong input',cr,lf,'$' inputAmsg db 'Please input A',cr,lf,'$' outstring db 'Output:',cr,lf,'$'

Detect/receive multiple key-presses at the same time in DOS?

巧了我就是萌 提交于 2019-11-27 08:39:30
问题 I'm in the middle of writing air hockey in tasm and I have encounter a problem which is how I get two keys/clicks at once because I need to get both click at once to move both players in one time and Im trying a lot but I don't think I have a way to doing it. I heard that I need to read from the buffer directory and see what keys are there and read each one individually but I don't really know how to do this. 回答1: Do you mind working with scancodes? I know this is not the simple, drop-in,

tasm: operand type does not match

你。 提交于 2019-11-27 04:54:46
问题 .model small .stack .data buff label byte maxchar dw 50 readchar dw 0 name1 db 48 dup(0) m1 db 10,13,"enter name: $" m2 db 10,13,"your name is: $" .code mov ax, @data mov ds, ax lea dx, m1 mov ah, 09 int 21h lea dx, buff mov ah, 10 int 21h mov ah,0 mov al, readchar add ax, 2 mov si, al mov buff[si],24H ;ascii code for $ to terminate string lea dx, m2 mov ah, 9 int 21h lea dx, name1 mov ah, 09 int 21h mov ah, 4ch int 21h end 回答1: The operand type does not match error comes from trying to move

How to generate a nasm compilable assembly code from c source code on Linux?

自作多情 提交于 2019-11-27 00:02:27
问题 Test platform is 32 bit Linux. Basically, I know gcc can be used to generate both Intel and At&T style assembly code, but it seems that you can not directly use nasm/tasm to compile the Intel style assembly code gcc generated. I am conducting a project analysis asm code on both windows and Linux platform, so I am thinking if they can be both compiled by platform independent assembler like nasm\yasm, I could have a much easier time... So my question is how to generate a nasm compilable

How to print colored string in assembly language?

随声附和 提交于 2019-11-26 14:48:20
问题 Jan db " January$ " string db "Sun Mon Tue Wed Thu Fri Sat$" string1 db " 1 2 3$" string2 db " 4 5 6 7 8 9 10$" string3 db "11 12 13 14 15 16 17$" string4 db "18 19 20 21 22 23 24$" string5 db "25 26 27 28 29 30 31$" 回答1: There are several ways to achieve your goal IN TEXT MODE : Display char by char : this way you can choose one color for every character. Access screen memory : at segment 0B800:0. Display the whole string with the same color. Next code does the job with the third option (the

I don't understand how to use Interrupt 21, AH=0ah

Deadly 提交于 2019-11-26 11:34:57
问题 My information is coming from here. The assignment asks for a program that reads in no more than 20 characters, converts those characters to upper case, and then prints the input as capitals. I have no idea how to access the input from int21/AH=0ah. I really can\'t ask a more precise question unless I understand what is linked above. Can someone explain? Also, I\'m using TASM if that makes any difference. Also, I\'m testing this on freedos. UPDATE1: Alright, thanks to your help, I believe I

8086 assembly on DOSBox: Bug with idiv instruction?

那年仲夏 提交于 2019-11-26 02:21:29
I was helping a friend of mine debug his program, and we narrowed it down to an issue which occurs even here: .MODEL small .STACK 16 .CODE start: mov ax, 044c0h mov bl, 85 idiv bl exit: mov ax, 4c00h int 21h end start After assembling it with tasm 4.1, and running it on DOSBox 0.74, it goes into an infinite loop. When inspecting it with turbo debugger one can see it happens after the idiv instruction, which for some reason modifies the cs and ip registers, and after two seemingly random instructions restores them to point to the idiv line, executing it again ad infinitum. Does anyone have any

8086 assembly on DOSBox: Bug with idiv instruction?

断了今生、忘了曾经 提交于 2019-11-26 01:47:49
问题 I was helping a friend of mine debug his program, and we narrowed it down to an issue which occurs even here: .MODEL small .STACK 16 .CODE start: mov ax, 044c0h mov bl, 85 idiv bl exit: mov ax, 4c00h int 21h end start After assembling it with tasm 4.1, and running it on DOSBox 0.74, it goes into an infinite loop. When inspecting it with turbo debugger one can see it happens after the idiv instruction, which for some reason modifies the cs and ip registers, and after two seemingly random