delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
X-Received: | by 10.66.119.41 with SMTP id kr9mr826164pab.47.1405652023583; |
Thu, 17 Jul 2014 19:53:43 -0700 (PDT) | |
X-Received: | by 10.50.50.205 with SMTP id e13mr56835igo.17.1405652023334; Thu, |
17 Jul 2014 19:53:43 -0700 (PDT) | |
Newsgroups: | comp.os.msdos.djgpp |
Date: | Thu, 17 Jul 2014 19:53:42 -0700 (PDT) |
Complaints-To: | groups-abuse AT google DOT com |
Injection-Info: | glegroupsg2000goo.googlegroups.com; posting-host=2601:7:f00:2ca:eccf:c87e:5a70:1b5e; |
posting-account=05hOMwoAAAB6R8xtiQKzEljSMzgOhVF1 | |
NNTP-Posting-Host: | 2601:7:f00:2ca:eccf:c87e:5a70:1b5e |
User-Agent: | G2/1.0 |
MIME-Version: | 1.0 |
Message-ID: | <82286315-4f2d-4699-8c58-97fb7bdf08cc@googlegroups.com> |
Subject: | question about implementation,usage of _dosmemput* |
From: | Jim Michaels <jmichae3 AT yahoo DOT com> |
Injection-Date: | Fri, 18 Jul 2014 02:53:43 +0000 |
X-Received-Bytes: | 2942 |
X-Received-Body-CRC: | 659074276 |
Bytes: | 3184 |
Lines: | 44 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id s6I3F2dP030329 |
Reply-To: | djgpp AT delorie DOT com |
http://www.delorie.com/djgpp/doc/libc/ I was looking at the documentation for _dosmemputw(), and I understood that I wanted to put a uint16_t to a 640k dos buffer __tb, however, I just realized I have no way to get the data from the variable to the dos memory. no way to specify the variable address. _go32_dpmi_allocate_dos_memory() I looked at this example, and none of these examples say what it is exactly they are doing, and it's not clear/obvious. an example that includes an actual variable that'w wider than 1 byte to put into memory would be very very helpful. please put it in the documentation so others and I know how to use this. thanks. as it is, my coding is blocked because I don't know what to do. if buffer is the target as it's described, where do I put the source? no argument for this I can find. help. thanks. //for use with USB const uint8_t diskInterrupt=0x13, SendPacketCommand=0x50, zeroByte=0, fullPacketSize=255, sizeByte=fullPacketSize, fullPacketDataLength=sizeByte-packetOverhead, lastPartialPacketDataLength=bufferLength%fullPacketDataLength, lastPartialPacketSize=lastPartialPacketDataLength+packetOverhead; const uint16_t key=0xb055; uint8_t* _data; //this is an argument from a function _go32_dpmi_seginfo info; info.size=(fullPacketSize+15)/16; _go32_dpmi_allocate_dos_memory(&info); //ok. target is __tb+0, source is offset(???) which is info.rm_segment*16 //key=0b055hh. this won't change from packet to packet _dosmemputw(__tb+0,1,info.rm_segment*16); where do I put the address for key? I just don't know how to cobble together these 2 parts of the API from the examples and the declarations. could some explanatory comments at least be put in the examples?
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |