Page 2 of 2

Re: Questions about Assembly

Posted: Tue Jun 23, 2020 6:48 pm
by Idunno
Silverware wrote:
Tue Jun 23, 2020 5:25 pm
Your tool is lower level, that's all.
'Twas a joke, playing off of the fact that assembly is the lowest I've been, with nothing in between that and C++. :ghost:
Open a file with W, or RW, or A flags to write.
Move the cursor to wherever you want to write to (this is why A is great, it STARTS at the end)
Then write data.
Then either repeat, or close the file descriptor.
[solid snake]A Flag?[/solid snake] :think:
You also wanna confirm Actual bytes written to intended bytes written per step.
I understood half of this. :?

Re: Questions about Assembly

Posted: Tue Jun 23, 2020 7:54 pm
by Silverware
Idunno wrote:
Tue Jun 23, 2020 6:48 pm
Silverware wrote:
Tue Jun 23, 2020 5:25 pm
Your tool is lower level, that's all.
'Twas a joke, playing off of the fact that assembly is the lowest I've been, with nothing in between that and C++. :ghost:
Ah. :ghost:
Open a file with W, or RW, or A flags to write.
Move the cursor to wherever you want to write to (this is why A is great, it STARTS at the end)
Then write data.
Then either repeat, or close the file descriptor.
[solid snake]A Flag?[/solid snake] :think:
A Flag is an option. In this case, 'Write' 'ReadWrite' or 'Append' modes on the file open call.
You also wanna confirm Actual bytes written to intended bytes written per step.
I understood half of this. :?
After writing, the process should output the number of bytes written to file.
Or get the new position of the cursor/seek header, and compare to the previous position for written bytes.
Which you then should check against what you WANTED to write, to confirm you actually wrote what you wanted to write.

Re: Questions about Assembly

Posted: Tue Jun 23, 2020 8:08 pm
by Idunno
Silverware wrote:
Tue Jun 23, 2020 7:54 pm
Open a file with W, or RW, or A flags to write.
Move the cursor to wherever you want to write to (this is why A is great, it STARTS at the end)
Then write data.
Then either repeat, or close the file descriptor.
[solid snake]A Flag?[/solid snake] :think:
A Flag is an option. In this case, 'Write' 'ReadWrite' or 'Append' modes on the file open call.
How is the append flag tripped? Never mind, found it. :ghost:
You also wanna confirm Actual bytes written to intended bytes written per step.
I understood half of this. :?
After writing, the process should output the number of bytes written to file.
Or get the new position of the cursor/seek header, and compare to the previous position for written bytes.
Which you then should check against what you WANTED to write, to confirm you actually wrote what you wanted to write.
Thank. :ghost:

Re: Questions about Assembly

Posted: Tue Jun 23, 2020 9:53 pm
by Silverware
Haha! Awesome.
Hopefully this helps you.

At least the concepts should be close or the same. :D

Re: Questions about Assembly

Posted: Mon Jun 29, 2020 7:51 am
by Idunno
Does anybody know how to send a file through a usb port? From scratch? :ghost:

Re: Questions about Assembly

Posted: Mon Jun 29, 2020 9:50 am
by Flatfingers
Have you tried Stack Overflow?

I'm trying to think whether -- from the point of view of doing this in 80x86 assembly language -- file transfer is much different if the target device is a USB drive versus any other kind of drive....

Re: Questions about Assembly

Posted: Mon Jun 29, 2020 3:12 pm
by Silverware
Idunno wrote:
Mon Jun 29, 2020 7:51 am
Does anybody know how to send a file through a usb port? From scratch? :ghost:
Linux?
A USB Device is just a File.

Re: Questions about Assembly

Posted: Mon Jun 29, 2020 4:59 pm
by Idunno
Flatfingers wrote:
Mon Jun 29, 2020 9:50 am
Have you tried Stack Overflow?
Yeah, I don't go there anymore. They have a tendency to tell me that I'm asking a question that has already been asked, when it clearly hasn't been asked before. :ghost:
I'm trying to think whether -- from the point of view of doing this in 80x86 assembly language -- file transfer is much different if the target device is a USB drive versus any other kind of drive....
Linux?
A USB Device is just a File.
I'm not sending a file to a usb drive, I'm just yeeting it through one specific pin. :shh:

Hi Flatfingers. :wave:

Re: Questions about Assembly

Posted: Mon Jun 29, 2020 11:07 pm
by Flatfingers
Idunno wrote:
Mon Jun 29, 2020 4:59 pm
Flatfingers wrote:
Mon Jun 29, 2020 9:50 am
Have you tried Stack Overflow?
Yeah, I don't go there anymore. They have a tendency to tell me that I'm asking a question that has already been asked, when it clearly hasn't been asked before. :ghost:

You are not wrong about that. Along with what's been happening to the rest of social media, the people using SO over the past few years have become increasingly sniffy and intolerant of requests for help (even if there are also more "no I didn't try reading anything first just answer meeeeeee" questions being posted).

Stack Overflow's not terrible as a source of static info, but as you say, not much point in trying to have a productive conversation around the self-appointed Gatekeepers of Non-Redundancy.

Idunno wrote:
Mon Jun 29, 2020 4:59 pm
Hi Flatfingers. :wave:

Howdy!