flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > rep outsw |
Author |
|
sinsi 14 May 2009, 06:27
DS and ES the same?
|
|||
14 May 2009, 06:27 |
|
dosin 14 May 2009, 06:29
yes - I though it may be something with es,ds
so I tried setting them the same before calling.. still same results// |
|||
14 May 2009, 06:29 |
|
sinsi 14 May 2009, 06:33
With 'rep' you are using ecx - that's ok?
Some output to ports doesn't like 'rep outs' because it's too fast. |
|||
14 May 2009, 06:33 |
|
dosin 14 May 2009, 06:35
yes - mov ecx,256
I have gone over it a million times.. but still running across this prob.. Quote: Some output to ports doesn't like 'rep outs' because it's too fast but that would cause it not to work with or with out the base.. with the base no crash.. just junk out |
|||
14 May 2009, 06:35 |
|
revolution 14 May 2009, 06:38
And DX=?
|
|||
14 May 2009, 06:38 |
|
dosin 14 May 2009, 06:41
mov edx,[hdbase]
|
|||
14 May 2009, 06:41 |
|
revolution 14 May 2009, 06:42
I think you need to show ALL your code. We can't keep guessing like this!
|
|||
14 May 2009, 06:42 |
|
dosin 14 May 2009, 06:48
deleted!
Last edited by dosin on 14 May 2009, 08:15; edited 1 time in total |
|||
14 May 2009, 06:48 |
|
revolution 14 May 2009, 06:55
Code: mov edx,[hdbase] hddwait3: mov dx,0x1f7 ;<------- Hmm? in al,dx test al,128 jnz hddwait3 rep outsw ;DX=0x1F7, is that what you want? |
|||
14 May 2009, 06:55 |
|
dosin 14 May 2009, 06:59
sorry it has a
Code: mov edx,[hdbase] pushad hddwait3: mov dx,0x1f7 in al,dx test al,128 jnz hddwait3 popad rep outsw |
|||
14 May 2009, 06:59 |
|
revolution 14 May 2009, 07:03
Why do you have the fixed value 0x1F7? Are you using a different hdbase or is that fixed to 0x1F0? Or what? Why have the fixed value 0x1F7 at all, it is going to cause you problems if you try to change to a different base.
|
|||
14 May 2009, 07:03 |
|
dosin 14 May 2009, 07:10
value 0x1F7
Code: mov dx,0x1f7 in al,dx test al,128 jnz hddwait3 this is a function to test the hd before writing.. This is the HD Base: mov edx,[hdbase] pushad ;hd test function popad rep outsw ;;;;;;;;;;;;;;;;;;;;;; mov esi,buffer add esi,base ; this gives me junk when I read it back mov ecx,256 mov edx,[hdbase] but if its not in it causes an unhand exception.. mov esi,buffer ;removed base add on ; this gives me junk when I read it back mov ecx,256 mov edx,[hdbase] this write correct but causes an excption ;;;;;;;;;;;;;;;;;;;;;;;;;; |
|||
14 May 2009, 07:10 |
|
revolution 14 May 2009, 07:17
Why not use this instead:
Code: ... mov edx,[hdbase] add edx,7 ... What is the value of hdbase? Is it 0x1F0? Since you haven't shown all your code I have to guess what you have done. |
|||
14 May 2009, 07:17 |
|
revolution 14 May 2009, 07:20
dosin wrote: mov esi,buffer |
|||
14 May 2009, 07:20 |
|
dosin 14 May 2009, 07:25
mov esi,buffer ;<- this gives me junk when I read it back
add esi,[base] yes! typo sorry.. getting a little sleepy... but thats what I have been trying.. the read function works fine.. with the add edi,[base] write funtion: add esi,[base]... just not the write function.. Thanks rev.. and sinsi I will post more tomorrow after getting some rest.. Last edited by dosin on 14 May 2009, 07:46; edited 1 time in total |
|||
14 May 2009, 07:25 |
|
sinsi 14 May 2009, 07:43
Quote: It causes an unhanled exception but writes the data correctly.. |
|||
14 May 2009, 07:43 |
|
dosin 14 May 2009, 07:50
I wonder if there an int that needs cleard that maybe I have as an unhand exception.. for the HD
yep that was it... I have been writing a real mode program for the last few weeks.. and when I when back to PM.. I did everthing but add the int handler for the Disk Drive.. Works fine now... Thanks again.. |
|||
14 May 2009, 07:50 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.