tasm

how to show the index of element found in tasm program

空扰寡人 提交于 2020-12-13 20:58:28
问题 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

Don't understand what's wrong with my PCX code

风流意气都作罢 提交于 2020-05-16 06:33:18
问题 I have a code that shows a PCX using assembly By its width Example image 320x200 x=0, y=0 But if X ( StartPictX ) and Y ( StartPictY ) are unequal to 0, it ruins the picture. And I need to fix that... The original code: ;-------------------------------------- ; Load and show file *.PCX 320x200x256 ; ;-------------------------------------- IDEAL MODEL large P386 MACRO SHOWPCX StartX, StartY, fName mov ax, [StartX] mov [Point_X], ax mov ax, [StartY] mov [Point_Y], ax mov dx, offset fName call

Print into screen array with character GUI TASM Assembly

匆匆过客 提交于 2020-01-26 04:38:09
问题 Good afternoon, I'm trying to show on screen an array of strings with GUI Turbo Asembler TASM, the problem that I can not show the all strings only the first. If someone can help me correctly display the strings on the screen and move through that array, very grateful- This an example in Borland C++ Example This actually in TASM: Program in tasm the code is the following. .MODEL small .STACK 100h ; reserves 256 bytes of uninitialized storage .DATA startX equ 35 startY equ 8 y db ? x db ? t1

Colored Hello World in TASM

僤鯓⒐⒋嵵緔 提交于 2020-01-25 07:12:19
问题 Good day. I'm new in assembly language and I'm trying to print a colored "Hello World" in TASM. Here is my code so far. It just prints "hello world" without a color. .model small .stack 100h .data message db 13,10,"Hello World!$" .code main proc near lea dx, message mov ah, 09h int 21h mov ah,4ch int 21h main endp I've read something like this mov ah,9 ;Function 9: Write character and attribute at cursor position mov al,'H' ;AL = character to display mov bh,0 ;BH = page number mov bl,02EH ;BL

Set and reset keyboard Interrupt Service Routines in x86 real mode within DOS with Assembly

白昼怎懂夜的黑 提交于 2020-01-24 11:14:12
问题 How do you properly set, and then reset, the keyboard ISR in DOS? (x86 assembly, real mode, 16 bit, with TASM) I have the following assembly code which sets up my ISR for the keyboard. All it is supposed to do is print out a sentence each time a key is pressed, up to five times. Then it is supposed to exit. It seems like the ISR is being installed correctly. It will print out a sentence each time a key is pressed (once for down, once for up). However, it appears as though I am uninstalling

lodsb tasm outputs only last letter from the file

不打扰是莪最后的温柔 提交于 2020-01-16 01:01:12
问题 I don't know where is the problem here, i'm trying to output all the character from file to the screen, but somehow it prints only the last one. For example if my test.txt file has a line abc in it, the output shows us only c . How should i use lodsb properly in this situation? Don't mind some unnecessary lines in data section, i just pasted not the all code. Updated code: .model small .stack 100h .data filename db 'test.txt',0 filename1 db 'temp.txt',0 error_open db 'impossible to open this

Turbo assembler language cursor position, offset

我怕爱的太早我们不能终老 提交于 2020-01-11 11:17:10
问题 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