flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 09 Nov 2016, 08:48
Which OS are you using?
I don't see where you are sending the sector data to the controller. |
|||
![]() |
|
Hercules 09 Nov 2016, 08:58
revolution wrote: Which OS are you using? Are you so dumb? Here is the part that send data to sector: org 100h jmp Start send_controller: ; send_check_again: ; call delay mov DX, 3F4h ; IN AL, DX ; test al,80h jz send_check_again call delay ; mov DX, 3F5h ; mov AL, BL ; OUT DX, AL ; ret ; delay: mov si,500 L1: cmp si,0 jz L2 dec si jmp L1 L2: ret mov bl,1 ;SECTOR call send_controller |
|||
![]() |
|
revolution 09 Nov 2016, 09:02
I mean that actual data from memory for each sector. It would be 512 bytes for each sector.
|
|||
![]() |
|
Hercules 09 Nov 2016, 09:07
revolution wrote: I mean that actual data from memory for each sector. It would be 512 bytes for each sector. Here is: mov bl,2 ;512 BYTES PER SECTOR call send_controller 2 = 512 butes per sector to floppy disk controller See that my code is in protected mode only using I/O ports without interrupts |
|||
![]() |
|
revolution 09 Nov 2016, 09:09
You have told it where to write data, and how much to write, but you haven't told it what to write. You will still need to send the 512 bytes that you want placed into the sector.
Perhaps some type of loop that reads a byte from memory and sends it to the controller, and repeats for 512 times. |
|||
![]() |
|
Hercules 09 Nov 2016, 09:12
revolution wrote: You have told it where to write data, and how much to write, but you haven't told it what to write. You will still need to send the 512 bytes that you want placed into the sector. Nooooooooooooooooooooooooooooooooooooooooooooooooooo!!! xmov bl,2 ;512 BYTES PER SECTOR call send_controller Last edited by Hercules on 09 Nov 2016, 09:14; edited 1 time in total |
|||
![]() |
|
revolution 09 Nov 2016, 09:14
But still no data written. Do you want to write 512 bytes of all 0x00, or all 0xff, or something else? You need to tell the controller what bytes to write there.
|
|||
![]() |
|
Hercules 09 Nov 2016, 09:16
revolution wrote: But still no data written. Do you want to write 512 bytes of all 0x00, or all 0xff, or something else? You need to tell the controller what bytes to write there. No! I give up! Aaarrggghhh! I am having a hysterical attack |
|||
![]() |
|
revolution 09 Nov 2016, 09:20
The "mov bl,2 ;512 BYTES PER SECTOR" only tells it you want to write 512 bytes, it doesn't tell it what those bytes will be. Write a loop to send the 512 bytes that will be written into the sector.
Father: Tell a 512 word message to the neighbour. Son: Okay. ... time passes ... Son: Um dad, so what are the actual 512 words you want me to say? Father: Oh yeah, here they are: blah blah blah ... |
|||
![]() |
|
neville 09 Nov 2016, 10:01
revo I suppose you should be congratulated for your patience and tolerance of abuse!!
It would seem Hercules has a lot to learn: not only in programming but also in manners and basic civility. Although admittedly your "Which OS..." question may have been a little bit infuriating... _________________ FAMOS - the first memory operating system |
|||
![]() |
|
revolution 09 Nov 2016, 10:03
neville wrote: Although admittedly your "Which OS..." question may have been a little bit infuriating... Edit: Moved to DOS. It is clearly DOS code, but we still don't know if the OP is running it Windows (or maybe Linux ![]() |
|||
![]() |
|
neville 09 Nov 2016, 18:58
revolution wrote: It is clearly DOS code _________________ FAMOS - the first memory operating system |
|||
![]() |
|
revolution 09 Nov 2016, 22:20
neville wrote:
|
|||
![]() |
|
neville 10 Nov 2016, 00:34
revolution wrote: I used the "org 100h" as my guiding line. Makes a .com file by default. In the early days of developing FAMOS I adopted ORG 0100H for most of my code modules (kernel, drivers, global subroutines and applications) simply because I could also test and debug them in DOS. (Later I developed resident debuggers and a fasm-based IDE in FAMOS so I don't need "DOS compatibility" any more) _________________ FAMOS - the first memory operating system |
|||
![]() |
|
revolution 10 Nov 2016, 00:47
Fairy Nuff. So when the OP has recovered from the hysterical attack perhaps they can enlighten us as to the actual intended use for this code.
If the error message and/or the observed behaviour was given (rather than the vague "my code dont works") then we could have narrowed down some things faster. |
|||
![]() |
|
neville 10 Nov 2016, 03:03
Exactly.
Nuff said? I suspect it was a random programming exercise given to a hapless IT student. _________________ FAMOS - the first memory operating system |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.