tasm

Assembly Extended Registers not working

烈酒焚心 提交于 2021-01-29 20:43:17
问题 I am fairly new to Assembly and TASM and i have the following question. I want to use the extended version of the registers, specifically EBX. By using the code below, but without the ".386" directive, it doesn't work, saying that "Undefined symbol EBX". But with it, it doesn't recognize the INT 21h instruction which from what i understands terminated the program and is useful when debugging it with TurboDebugger. Can someone tell me how i can avoid this situation? PS: Yes, i know that TASM

finding index of the array in tasm assembly language and printing it

倖福魔咒の 提交于 2021-01-29 09:23:55
问题 I have made a tasm assembly language program, which finds the minimum in the user-inputted array. I want to find the index of the element of the minimum value which the program is finding. I want to find the index of the element which the program finds. For example: input array is [1,2,3,4,5,6]. It should return 1 as minimum value and 0 as index. Here is the code. Data Segment msg db 0dh,0ah,"Please enter the length of the array: $" msg1 db 0dh,0ah,"Enter a number: $" newl db 0dh,0ah," $" res

assembly concatenate two strings

感情迁移 提交于 2021-01-29 04:02:04
问题 I want to concatenate two strings but in my output instead of getting the final concatenated string, I get a line of weird characters and spaces, maybe someone could help me a bit. I want to save the result in s3. Here is the code DATA SEGMENT STR1 DB "ENTER FIRST STRING HERE ->$" STR2 DB "ENTER SECOND STRING HERE ->$" STR3 DB "CONCATEnatedD STRING :->$" STR11 DB "FIRST STRING : ->$" STR22 DB "SECOND STRING: ->$" s1 DB 20 DUP("$") s2 DB 20 DUP("$") s3 db 40 dup(?) NEWLINE DB 10,13,"$" DATA

Program solving expression in assembly

丶灬走出姿态 提交于 2020-12-31 04:43:51
问题 I have a problem with my simple program in assembly. I'm using DOSBox and TASM. The problem is that the operand types don't match in lines 76, 78, and 80. This is after multiplication. I tried to make some changes by using a different variable size. ; -------------------------------------------- ; Equation=(a+c*b)/d-2*c, ; -------------------------------------------- .model small .stack 100h .data a db 0 b db 0 c db 0 d db 0 result1 db ? result2 db ? message1 db "Equation: (a+c*b)/d-2*c a=$"

Program solving expression in assembly

别说谁变了你拦得住时间么 提交于 2020-12-31 04:43:29
问题 I have a problem with my simple program in assembly. I'm using DOSBox and TASM. The problem is that the operand types don't match in lines 76, 78, and 80. This is after multiplication. I tried to make some changes by using a different variable size. ; -------------------------------------------- ; Equation=(a+c*b)/d-2*c, ; -------------------------------------------- .model small .stack 100h .data a db 0 b db 0 c db 0 d db 0 result1 db ? result2 db ? message1 db "Equation: (a+c*b)/d-2*c a=$"

Use of Turbo Assembler

吃可爱长大的小学妹 提交于 2020-12-30 03:38:31
问题 I use an IBM processor, and I have barely begun to delve into x86 assembly. Now that I have thoroughly read through an assembly book, I decided to put a simple program to the test (one that prints an exclamation mark on the screen): .MODEL SMALL .CODE MOV AH,2h MOV DL,21h INT 21h INT 20h END Now, there was a similar example in the book titled Peter Norton's Assembly Language Book for the IBM PC that went along these lines: .MODEL SMALL .CODE MOV AH,2h MOV DL,2Ah INT 21h INT 20h END I assume

Use of Turbo Assembler

坚强是说给别人听的谎言 提交于 2020-12-30 03:37:42
问题 I use an IBM processor, and I have barely begun to delve into x86 assembly. Now that I have thoroughly read through an assembly book, I decided to put a simple program to the test (one that prints an exclamation mark on the screen): .MODEL SMALL .CODE MOV AH,2h MOV DL,21h INT 21h INT 20h END Now, there was a similar example in the book titled Peter Norton's Assembly Language Book for the IBM PC that went along these lines: .MODEL SMALL .CODE MOV AH,2h MOV DL,2Ah INT 21h INT 20h END I assume

ASM EXE program 16bit: Error changing size of memory

匆匆过客 提交于 2020-12-26 04:27:59
问题 I write EXE program with SMALL model. I want to load other programs with the help of my program. I read that first of all I must free some memory. I use DOS 4Ah INT 21h interrupt. But I have error 7 (control units memory is destroyed) in AX when use it. What I made incorrect? ;-------------------MACRO----------------- println MACRO info push ax push dx mov ah, 09h mov dx, offset info int 21h ;print new line mov dl, 10 mov ah, 02h int 21h mov dl, 13 mov ah, 02h int 21h pop dx pop ax ENDM ;----

ASM EXE program 16bit: Error changing size of memory

给你一囗甜甜゛ 提交于 2020-12-26 04:25:32
问题 I write EXE program with SMALL model. I want to load other programs with the help of my program. I read that first of all I must free some memory. I use DOS 4Ah INT 21h interrupt. But I have error 7 (control units memory is destroyed) in AX when use it. What I made incorrect? ;-------------------MACRO----------------- println MACRO info push ax push dx mov ah, 09h mov dx, offset info int 21h ;print new line mov dl, 10 mov ah, 02h int 21h mov dl, 13 mov ah, 02h int 21h pop dx pop ax ENDM ;----

how to show the index of element found in tasm program

£可爱£侵袭症+ 提交于 2020-12-13 20:59:27
问题 how can i display index number of the element which i have found? i have found out the maximum element from the array and now I want to print the index of the element which I have found how to proceed? i want to find the element of the largest number which i found in the array according to the below logic ? Data Segment msg db 0dh,0ah,"Please enter the length of the array: $" msg1 db 0dh,0ah,"Enter a number: $" newl db 0dh,0ah," $" res db 0dh,0ah,"The maximum is: $" len db ? max db ? Data