Using a 2dim array is not worth it. Strings ARE in ASCII, so if you have the ascii code as an integer somewhere, you just print it directly to screen, which outputs it as an ascii character. For instance, if al=65, you output an 'A.'
Your problem is much easier if you were to go directly to...
Where's the array?
If you're doing a lot of repititive code, chances are you're doing it inefficiently.
Also, I suggest you sort INDEXES and not the actual records, moving records around can be *** time-consuming. "Information has a tendency to be free. Which means someone will always...
It would be nice to know WHERE it doesn't work, too...
Does it assemble okay?
Does it link okay?
Does it load and run okay?
Does it load, print a lot of computer-understandable curse words, then go beeping until you press the reset button?
Does it toast your computer? "Information has a...
There is no string input function in BIOS.
If you want an input function more flexible than DOS's, you want to build your own.
If you're using Windows... hey, you probably aren't. "Information has a tendency to be free. Which means someone will always tell you something you don't want to...
The flicker is probably caused by not using direct video access. If you're doing BIOS access (omg!) it'll be ridiculously slow even on later processors.
Also, drawing pixel by pixel is not recommended for any 16-color video mode, especially for horizontal lines since you can draw up to 8...
You might also try to *SEARCH* on win32asmboard.cjb.net . Some of the people there have had to face problems of interfacing C++ to ASM, and they may have posted some things you can use. The point though is to use the *SEARCH* function on win32asmboard.cjb.net since if you ask, you stand a...
Interfacing between C++ and ASM can be ridiculously difficult. The difficulty lies in the fact that in C++, the compiler puts more in each class than you put in. What is more, (at least in the past) different C++ compilers did not necessarily compile in the same manner. If you are using...
add lowdword,1
adc hidword,0
"Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
Yes, if the OS supports it.
As it happens I saw some OLD Windows code once which allowed a 16-bit real mode DOS program to send information to a 16-bit protected mode Windows program, through the clipboard... "Information has a tendency to be free. Which means someone will always tell you...
It's easier if you convert the hex string into a binary number first. "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
Do some research on binary to string conversions, this forum has a 'search' feature ;-). "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
No, multi-word maths will still work. The only problem is that you have a LOT of work to do to implement it. In fact, using unpacked BCD (which is what you suggested, storing a single digit in one byte is unpacked BCD...) may be more difficult than using multi-word maths. The problem you have...
You prolly shouldn't have put it as matthew6is2good.5, unless you have an array somewhere that tells you where each word ends and/or starts... so how would YOU know where each word ends or starts?
To center a string:
NumSpaces = (ScreenWidth - StringSize)/2
Where NumSpaces is the number of...
If you're doing Win32Asm programming, you can prolly work with hutch's MASM32 package, however I think you are probably doing DOS16 asm programming? "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
Come now. N! is a LARGE number. So how do you handle large numbers which would overflow your processor's normal word, which is 32-bit? You use BCD or multi-word maths. Multi-word maths is prolly your best bet. It's up to YOU to wonder how your going to implement N!: N! is simply:
product...
That's the number of bytes to pop off IIRC. "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
You have two alternatives:
1) Use BCD. The Intel 80x86 series can work with BCD.
2) Use multi-word math. The Intel 80x86 series can also work with multiple words.
Personally I recommend the multi-word solution.
You can find some multi-word maths stuff on this forum in threads dukely started...
How sure are you that the _Putstr macros, as well as the PutDec routine, don't trash di? "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
Where's the PutDec routine? "Information has a tendency to be free. Which means someone will always tell you something you don't want to know."
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.