The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages - More
> Other Programming Languages
|
Assembly langauge 10h and 33h arent working
Discuss Assembly langauge 10h and 33h arent working in the Other Programming Languages forum on Dev Shed. Assembly langauge 10h and 33h arent working A place for discussing programming languages not covered in specific forums such as Assembler, COBOL, etc. - you get the idea.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 8th, 2012, 12:14 AM
|
|
Registered User
|
|
Join Date: May 2012
Posts: 3
Time spent in forums: 46 m 29 sec
Reputation Power: 0
|
|
|
Assembly langauge 10h and 33h arent working
I'm using the flat assembler writer with windows xp and I have these two functions that don't seem to position the cursor but wikipedia and a book I'm reading says they position the cursor. I was hoping someone could tell me why and maybe show me an example of a low level program that will position the cursor.
Code:
mov AH, 02h
mov BH, 00h
mov DH, 10d
mov DL, 10d
int 10h
Code:
mov AX, 0004h
mov CX, 10d
mov DX, 10d
int 33h
|

May 8th, 2012, 08:34 AM
|
|
|
|
INT 10h/AH=02h works for me. Can you show a short program of how you're using it & explain what you expect to happen and how the program's actual behavior differs?
INT 33h calls deal with the mouse. I don't know how well they'll operate on a modern system.
__________________
sub{*{$::{$_}}{CODE}==$_[0]&& print for(%:: )}->(\&Meh);
|

May 9th, 2012, 09:34 PM
|
|
Registered User
|
|
Join Date: May 2012
Posts: 3
Time spent in forums: 46 m 29 sec
Reputation Power: 0
|
|
both of those are how I run the program with the flat assembler for windows. each are different programs and neither make exe files. They make .bin files when I compile them. I'll post the exact code for int 10h again it's exactly what I posted. Also I am a newb at assembly.
Code:
mov AH, 02h
mov BH, 00h
mov DH, 10d
mov DL, 10d
int 10h
|

May 10th, 2012, 07:05 AM
|
|
|
The code snippet you posted is perfectly fine by itself, so the problem must be in the code that uses it, or in your expectations of what happens. So for me to understand your program I need to see complete code and know how your expectations differ from what the code actually does.
This website has tips for creating such an example. For example, here's a short program that writes text around the middle of the screen.
Code:
.data
text db 'This is the middle of the screen$'
.code
main proc
mov ah, 02h
mov bh, 00h
mov dh, 0bh
mov dl, 1Ah
int 10h
mov ah, 09h
lea dx, text
int 21h
mov ah, 4ch
mov al, 00h
int 21h
main endp
end main
If you're not producing executables, how are you running the programs? I have not used the Flat Assembler program you mention, but from its manual it looks like you would use it to create object modules & link them into an executable like any other assembler. If you're using some type of interpreter or emulator to execute your code you need to make sure it supports the BIOS/DOS interrupts you're using.
|

May 10th, 2012, 07:58 AM
|
 |
Contributed User
|
|
|
|
|
> both of those are how I run the program with the flat assembler for windows
You need to be creating a segmented 16-bit DOS program, not a flat 32-bit windows program.
You need to make it a 16-bit executable so that windows knows to load DOS-VM to run your program in - where 16-bit interrupts like int10 actually mean something.
|

May 10th, 2012, 04:54 PM
|
|
Registered User
|
|
Join Date: May 2012
Posts: 3
Time spent in forums: 46 m 29 sec
Reputation Power: 0
|
|
|
Alright the code I posted was exactly what I used and it doesn't work on the flat assembler. Your code doesn't work when I use it because of the .data string the main proc string the main endp string the .code string and the one that really sticks out to me is the lea string doesn't even compile.
I wanna ask Salem how to make a .bin file into an executable with fasm but I'm gonna do some research for that. That might be the reason 33h isn't working. Heh when I compile the program I get a bin file. Duh that's not executable. I guess My question is if anyone knows how to make exe files out of bin files.
|

May 10th, 2012, 11:41 PM
|
 |
Contributed User
|
|
|
|
According to the download page you need to download the DOS version of the program to generate DOS compatible executables.
They also have a message board which would have been a good place to ask, if you haven't done so already.
|

July 26th, 2012, 01:28 PM
|
|
Registered User
|
|
Join Date: Jul 2012
Posts: 2
Time spent in forums: 2 h 54 m 3 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by salem According to the download page you need to download the DOS version of the program to generate DOS compatible executables. |
No, this is not true. All versions of FASM has the same features. They only run on different operating systems. The above code snippets are simply not in FASM syntax.
The proper code is:
Code:
use16
org 100h
mov ah, 02h
mov bh, 00h
mov dh, 0bh
mov dl, 1Ah
int 10h
mov ah, 09h
lea dx, [text] ; or simply "mov dx, text"
int 21h
mov ah, 4ch
mov al, 00h
int 21h
text db 'This is the middle of the screen$'
Quote: | Originally Posted by salem They also have a message board which would have been a good place to ask, if you haven't done so already. |
The flat assembler forum is really great place to ask questions about assembly programming for Windows, Linux and any other OS. 
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|