The forum is more intelligent than we give it creditNormanDunbar wrote:I was going to post some really bad Pascal code, but the Forum ate my first reply with a 403 Forbidden error.

The forum is more intelligent than we give it creditNormanDunbar wrote:I was going to post some really bad Pascal code, but the Forum ate my first reply with a 403 Forbidden error.
Ok, the current version of the document is now on GitHub. There will always be a "latest" version available from https://github.com/NormanDunbar/FPC-Cro ... ses/latest assuming all goes well. At present it's flagged as a pre-release.NormanDunbar wrote:The document will be available on my GitHub releases area as will the LyX/LaTeX source "soon". Anyone can have it, so feel free to link to it -- when I post the link. I'll be intending to keep it up to date too. Corrections etc are all welcome.Chain-Q wrote:Glad that your PICNIC went well.And that's a quite nice document you've got there. It really extends on a lot of details for beginners, which I did not want to include into the wiki. But if you find some final location for it somewhere, I'll gladly link it from the FPC Wiki page.
Interesting, and yes, I see that too. Weird! I suspect it's something to do with, possibly, the PDF being UTF perhaps? I don;t see it when copying the document text, only the code. I'm not sure what to advise, sorry.Derek_Stewart wrote:I found copying the commands from the file introduced extra spaces in the pasted text.
Sorry Norman, but I'm pretty sure this patch is wrong, but having said this, I'm not saying the original version in there is entirely correct. But there I copied the mt_inf() function signature from QL-GCC libc actually.NormanDunbar wrote:A quick fix for today. The existing MT_INF in qdos.inc has the system variables address coming back via a pchar and the ASCII version via a plongint. They are the wrong way around. Patch 6 fixes the problem.
Code: Select all
program inf;
uses
qdos;
type
Tver = array[0..3] of char;
var
job_id: longint;
ver_ascii: longint;
system_vars: pbyte;
const
SV_IDENT = $00;
SV_TVMOD = $32;
SV_RAND = $2e;
SV_PTYP = $a1;
begin
job_id:=mt_inf(@system_vars,@ver_ascii);
writeln('Job ID:',job_id);
writeln('Version: ',hexstr(ver_ascii,8),' ',Tver(ver_ascii));
writeln('System vars at: $',hexstr(system_vars));
writeln('Identification: $',hexstr(pdword(@system_vars[SV_IDENT])^,8));
writeln('Processor type: 680',hexstr(system_vars[SV_PTYP],2));
writeln('Monitor mode: ',system_vars[SV_TVMOD]);
writeln('Random number: ',pword(@system_vars[SV_RAND])^);
end.
No Pascal code shaming! All Pascal code is beautiful!NormanDunbar wrote:I was going to post some really bad Pascal code, but the Forum ate my first reply with a 403 Forbidden error.
I added a link to that page into: https://wiki.freepascal.org/Sinclair_QL#BuildingNormanDunbar wrote:Ok, the current version of the document is now on GitHub. There will always be a "latest" version available from https://github.com/NormanDunbar/FPC-Cro ... ses/latest assuming all goes well.
AI?mk79 wrote:The forum is more intelligent than we give it credit
Thanks.Chain-Q wrote: I added a link to that page into: https://wiki.freepascal.org/Sinclair_QL#Building
Hmmm. From your example, I see your point, I think.Chain-Q wrote:Sorry Norman, but I'm pretty sure this patch is wrong, but having said this, I'm not saying the original version in there is entirely correct. But there I copied the mt_inf() function signature from QL-GCC libc actually.
The address itself is a longword for sure, but it points to a series of bytes. As in, in that sequence not all fields are longwords, or 32bit aligned actually.NormanDunbar wrote:But the system variables address is a longword surely? Or at best a pointer to a byte?