tasm

how to move shapes for eg square in assembly x86 language

懵懂的女人 提交于 2019-12-02 19:56:51
问题 as per title, I know how to draw shape in 13h mode but have not idea how to move it on screen, next thing would be forcing the shape to bounce from edges of the screen, I think to redraw the shape in loop... but not to sure as I just started with assembly, I work on Tasm. Thanks for any suggestions. 回答1: Not related to assembly at all. If you know how to draw shapes in 13h mode, just do the mental exercise. Imagine how the video memory (a000:0000 region) content looks when you draw the square

asm change cmd background color

微笑、不失礼 提交于 2019-12-02 10:20:23
问题 I wrote the part that changes the text color, but I can't find a way to change the background color, this code is for tasm assembly: model small stack 256 .data ent db 0ah,0dh,'$' array db 2,4,5,6 db 7,8,9,5 db 1,2,3,4 db 5,6,7,8 temp dw 0 .code main : mov ax,@data mov ds,ax mov ah, 06h mov al, 0 mov cx, 0 mov dh, 79 mov dl, 79 mov bh, 4h int 10h This is a my code but it doesn't work: mov ah, 0bh mov bh, 01h mov bl, 2h int 10h mov ah, 02h mov dl, 34h int 21h mov ax,4c00h ; exit from program

Why are disassembled data becoming instructions?

核能气质少年 提交于 2019-12-02 10:12:41
问题 I need some help to understand what happens in the moment when this fragment of code "happens": "jmp Begin". I understand only that .com file can be 64kb so you want to put everything in one segment. You need to jmp if you want to put variables. But when I search about it, many guides just say in comment that jmp Begin is only to skip data and nothing else. And here is my question: What exactly happens in this moment: It appears that it runs this mov al, a mov bl, b sub al, bl But I can't

how to move shapes for eg square in assembly x86 language

我们两清 提交于 2019-12-02 09:02:16
as per title, I know how to draw shape in 13h mode but have not idea how to move it on screen, next thing would be forcing the shape to bounce from edges of the screen, I think to redraw the shape in loop... but not to sure as I just started with assembly, I work on Tasm. Thanks for any suggestions. Not related to assembly at all. If you know how to draw shapes in 13h mode, just do the mental exercise. Imagine how the video memory (a000:0000 region) content looks when you draw the square at first position, then imagine the content of vram when the square is at second position. The difference

how to fix the output for x86 turbo assembly language

青春壹個敷衍的年華 提交于 2019-12-02 08:59:28
DOSSEG .MODEL SMALL .STACK 100h .DATA UserName db "Name: $" CLRF db 10,13,"$" inputName db 24 dup ("$") CurYear db "Current Year: $" inputCurrentYear dw 8 dup ("$") BirYear db "Birth Year: $" inputBirthYear dw 8 dup ("$") outputName db "Hello, $" outputAge db "Your age is $" currentYearH1 db "$" currentYearH2 db "$" birthYearH1 db "$" birthYearH2 db "$" answer1 dw "$" answer2 dw "$" .code BEGIN: ;open bracket mov ax,@data mov ds,ax mov es,ax mov al,03h mov ah, 00h int 10h lea dx,CLRF mov ah,09h int 21h ;username input NameInput: lea dx,UserName mov ah, 09h int 21h mov inputName,21 lea dx

How to know if an assembly code has particular syntax (emu8086, NASM, TASM, …)?

孤人 提交于 2019-12-02 08:49:37
问题 I want to know how,by looking through a sample source code, recognise if the syntax used is em8086, TASM or NASM? I am a new to assembly..I would like to know more about emu8086 please. 回答1: NASM/YASM is easy to distinguish from MASM/TASM/emu8086. YASM uses NASM syntax, with a few minor differences in what it accepts for constants and directives. I don't know how to distinguish MASM from TASM, or TASM from emu8086, or FASM, so I'll leave that for another answer to address. In NASM, explicit

Turbo assembler language cursor position, offset

感情迁移 提交于 2019-12-02 07:53:23
We have given an instruction to make the the text CSC 112.1 to be centered. I used DB instruction and offset. This is my code .model small .stack .data c db 10,13,10,13," лллл ",10,13 db " лллллл ",10,13 db "лл лл",10,13 db "лл ",10,13 db "лл ",10,13 db "лл ",10,13 db "лл ",10,13 db "лл ",10,13 db "лл ",10,13 db "лл лл",10,13 db " лллллл ",10,13 db " лллл ",10,13,"$" .code mov ax,@data mov ds,ax call ccall ;call the procedure ccall which outputs C call scall ;call the procedure scall which outputs S call numcall ;call the procedure numcall which outputs 112.1 call exit ;call the procedure exit

What does SEG directive do in 8086?

大城市里の小女人 提交于 2019-12-02 06:56:13
SEG A : Assigns the content held in segment register corresponding to the segment in which A resides to the operand. I guess that means that if A lies in Data Segment, SEG A is the same as DS . Since DS holds the base address of the Data Segment, does MOV AX, LEA A MOV DX, SEG A MOV AX, [AX + DX] copy the physical address of A to AX ? I guess that means that if A lies in Data Segment, SEG A is the same as DS. Correct, if DS points to Data Segment. does MOV AX, LEA A MOV DX, SEG A MOV AX, [AX + DX] copy the physical address of A to AX? The last instruction is invalid, it does not exist in any

Getting keyboard input without echo in DOS

北战南征 提交于 2019-12-02 05:06:52
问题 I am making the game "Connect Four". The players have to enter a number between 1-4 so that the disc will drop into one of the columns. I am currently working on the first column. The problem is that you can enter any character and it will work (it only needs to work when you press '1') and I cant figure out how to fix it. Moreover, the number appears on the left side of the screen. How do I make it so when I enter the number it won't show on the screen? PlayerOneTurn: cmp [Player1Turn], 255

Why are disassembled data becoming instructions?

☆樱花仙子☆ 提交于 2019-12-02 04:00:46
I need some help to understand what happens in the moment when this fragment of code "happens": "jmp Begin". I understand only that .com file can be 64kb so you want to put everything in one segment. You need to jmp if you want to put variables. But when I search about it, many guides just say in comment that jmp Begin is only to skip data and nothing else. And here is my question: What exactly happens in this moment: It appears that it runs this mov al, a mov bl, b sub al, bl But I can't understand why it looks like this in turbo debugger. When I change starting value of Result from ? to