Re: [Ql-Users] A small machine code program...

2010-11-28 Thread gdgqler

On 27 Nov 2010, at 18:16, Marcel Kilgus wrote:

 Norman Dunbar wrote:
 Main() always returns int.
 
 True.
 
 Main always takes two parameters int and char **.
 
 Not true, int main(void) is valid according to C99 spec (see chapter 
 5.1.2.2.1 ;-) )
 
 But in context of the IOCC contest Tobias referred to, basically
 everything that compiles is valid (his example doesn't really work in
 any case). Though they're usually much worse, this for example is an
 actual winning entry from 1988:
 
 main(t,_,a)
 char *a;
 {return!0t?t3?main(-79,-13,a+main(-87,1-_,
 main(-86, 0, a+1 )+a)):1,t_?main(t+1, _, a ):3,main ( -94, -27+t, a
 )t == 2 ?_13 ?main ( 2, _+1, %s %d %d\n ):9:16:t0?t-72?main(_,
 t,@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
 ,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
 +k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
 l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
 n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
 ;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
 #'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/)
 :t-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
 +1 ):0t?main ( 2, 2 , %s):*a=='/'||main(0,main(-61,*a, !ek;dc \
 i...@bk'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry),a+1);}
 


Another 1988 winning entry was as follows according to Peter van der Linden.

#includestdio.h
#includectype.h
#define w printf
#define p while
#define t(s) (W=T(s))
char*X,*B,*L,I[99];M,W,V;D() {W==9?(w(`%.*s' is ,V,X),t(0):W==40?
(t(0),D(),t(41)):W==42?(t(0),D(),w(ptr to )):0;p(W==40?(t(0),
w(func returning ),t(41)):W==91?(t(0)==32?(w(array[0..%d]  of  ,
atoi(X)-1),t(0):w(array of  ),t(93)):0);}main(){p(w(input:  ),
B=gets(I))if(t(0)==9)L=X,M=V,t(0),D(),w(%.*s.\n\n,M,L);}T(s){if(!s||s==W)
{p(*B==9||*B==32)B++;X=B;V=0;if(W=isalpha(*B)?9:isdigit(*B)?32:*B++)
if(W33)p(isalnum(*B))B++,V++;}return W;} 

This translates C declarations into English.

The programmer was Gopi Reddy.

George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] A small machine code program...

2010-11-28 Thread Marcel Kilgus
gdgqler wrote:
 Another 1988 winning entry was as follows according to Peter van der Linden.

Though one must say that these programs are usually not written this
way, they're written more readable and obfuscated afterwards,
sometimes even using specialized obfuscation programs.

In any case, here's a C68 compatible entry:

#includestdio.h
main(){int i=0;while(i++100)printf(%i %s%s\n,i,i%3?:FIZZ,i%5?:BUZZ);}

Pretty straight forward and not really original, but still not that
easy to beat I guess.

On the web there are mighty crazy FIZZBUZZ programs available, but
they use slightly different rules in that they do not print the number
if FIZZ, BUZZ or both are written, which makes things a bit more
complicated.

Marcel

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] QL on 2 monitors

2010-11-28 Thread gdgqler

On 28 Nov 2010, at 12:37, Dilwyn Jones wrote:

 Does anyone know if any (or all!) of the QL emulators can work on the second 
 screen of a two-monitor PC setup? My PC can only handle a single monitor, so 
 although I have QPC, QemuLator and QL2K on this PC, I can't test them.

I had to set my laptop to operate two monitors to give talks. The set up is 
either two screens holding different parts of the whole, so that, by dragging a 
window to the edge of one screen it appeared in the other or It is  possible 
(with windowsxP) to have the same information displayed on both monitors. 

For the talk, of course, I arranged to have the same information on both  one 
monitor being, in fact, the projector.

I can confirm that QPC2 operated on both monitors, whatever the set up.

George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] QL on 2 monitors

2010-11-28 Thread Tobias Fröschle

Am 28.11.2010 13:37, schrieb Dilwyn Jones:
Does anyone know if any (or all!) of the QL emulators can work on the 
second screen of a two-monitor PC setup? My PC can only handle a 
single monitor, so although I have QPC, QemuLator and QL2K on this PC, 
I can't test them.


I think that what you have to do is drag the application to the edge 
of the screen when 2 monitors/2 desktops/wide desktop are in use and 
they will 'snap' onto the second screen, though it's a long time since 
I used a 2 screen setup.


It's a Quanta helpline request from a member who says this would 
influence his choice of which QL emulator he uses on his Windows PC. 
He said it'd be handy to leave all his PC applications running on one 
monitor and the QL by itself on the other, don't know why (unless he 
just doesn't want to get caught using a QL at work by being able to 
turn off monitor 2 if his boss approaches or something!!!)


Dilwyn Jones

Dilwyn,
I have a Vista dual screen setup at my office and at least QPC2 works 
perfectly with it. And yes, you simply drag the QL window to the monitor 
of choice. This obviously doesn't work in full-screen mode, but 
full-screen doesn't work well on modern LCD screens anyhow because they 
don't scale well. If I remember right, QPC2 uses the main monitor in 
full-screen mode.
No idea how the other emulators cope, however -  if they use a windowed 
mode, I see no reson why it shouldn't work as well.


Tobias

And, no, I don't use it to hide my QPC windows ;-). Dual screen is just 
a charm to work with when you're doing several things in parallel, like 
preparing graphics using windows that you want to use on the QL side.

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] A small machine code program...

2010-11-28 Thread Laurence Reeves

Tony Firshman wrote:

Marcel Kilgus wrote, on 26/Nov/10 17:02 | Nov26:

Marcel Kilgus wrote:

1for i=1to 100
2a$=:if i mod 3=0:a$=FIZZ
3if i mod 5=0:a$=a$BUZZ
4print i,a$:next i

(91 bytes including 4 LF)


Damn, missed something:

1for i=1to 100
2a$=:if i mod 3=0:a$=FIZZ
3if i mod 5=0:a$=a$BUZZ
4print i,a$:next

(89 bytes including 4 LF)


1i=i+1
2a$=:if i mod 3=0:a$=FIZZ
3if i mod 5=0:a$=a$BUZZ
4print i,a$:goto 1

82 bytes incl LF

and CTRL SPACE after 100.

This meets all Rich's requirements:
--
The rules are simple -
write out the values 1 to 100 on screen
If the value is divisible by 3 write 'FIZZ' after the number
If the value is divisible by 5 write 'BUZZ' after the number
If the value is divisible by 3 and 5 write 'FIZZBUZZ' after the number
--
Nothing about having to stop at 100 (8-)#

Tony


1PRINT CHR$(RND(TO 255)):GO TO 1

(It might take a little while...)

--
Lau AS! d-(!) a++ c p++ t+ f-- e++ h+ r--(+) n++(*) i++ P- m++
ASC Decoder athttp://www32.brinkster.com/ascdecode/

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] QL on 2 monitors

2010-11-28 Thread Dilwyn Jones



Dilwyn,
I have a Vista dual screen setup at my office and at least QPC2 
works perfectly with it. And yes, you simply drag the QL window to 
the monitor of choice. This obviously doesn't work in full-screen 
mode, but full-screen doesn't work well on modern LCD screens anyhow 
because they don't scale well.
I have that problem using the Aurora in some resolutions with an LCD 
screen. Looks worst with text, because individual horizontal lines get 
repeated and makes text look really bad. Guess it's even worse for Q40 
users with the 2:1 1024x512 pixel modes. At least some Aurora modes 
look not too bad on a 14 inch non-widescreen monitor I use with the 
Aurora. You do have to choose the right modes to suit the monitor, 
though, or it looks awful.


If I remember right, QPC2 uses the main monitor in full-screen 
mode.
No idea how the other emulators cope, however -  if they use a 
windowed mode, I see no reson why it shouldn't work as well.


Tobias


Thank you both (George and Tobias) for your replies. I knew QPC2 
could, because when I had my eeePC notebook (which is now living in 
West Ireland last I heard of it!) I was able to use QPC2 on either 
screen with that, although I couldn't remember how to go about it. I 
was using it when my son and I made the 25th anniversary QL 
presentation for Quanta. Annoyingly, the Powerpoint viewer I used for 
running that demo would only run on the first screen, so I had to have 
QPC2 on the second monitor at the time.


But I don't remember using QL2K or Q-emuLator like that. They can both 
run in windowed modes, so I guess SHOULD work (if anyone can confirm 
that?)


And, no, I don't use it to hide my QPC windows ;-). Dual screen is 
just a charm to work with when you're doing several things in 
parallel, like preparing graphics using windows that you want to use 
on the QL side.
Yes, of course - I must investigate whether my current laptop can 
handle 2 monitors, as I know the graphics card on this PC has only one 
video output. The eeePC could use its own screen as monitor one and an 
external monitor could be (1) in place of the internal screen 
(internal screen disabled), (2) duplicate the internal screen, or (3) 
be an external second screen which was not the same as what was 
displayed on the inbuilt monitor. Actually, (3) sort of worked in 
reverse for me on the eeePC, because it was possible to do more 
intricate work on the larger external monitor and leave things like 
Outlook running on the smaller screen, which was good enough to see 
when email arrived and so on. I remember the 14 inch monitor being 
stood behind the eeePC on top of a pile of books so I could see one 
display above the other without turning my head to see what I was 
typing! I seem to remember that some apps will let you drag and drop 
from programs running on one screen to programs running on another, 
which is great.


Dilwyn Jones 




___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


[Ql-Users] Q-emuLator

2010-11-28 Thread Dilwyn Jones

Um, a question from me this time...

Anyone know if Q-emuLator can print to a printer on a USB port? As far 
as I can see it seems to be only possible to print to a parallel LPT 
port on the PC, or in some cases a serial port printer if using the 
emulation mode.


(Am busy testing Quanta library submissions using Q-emuLator as a QDOS 
QL to test the programs, but can't seem to get anything to print).


Actually, quite an exercise in itself running QPC and Q-emuLator at 
the same time...for example, when both are trying to access the same 
floppy disk!


Guess Marcel and Daniele will be having kittens thinking of me 
butchering their respective emulators! :o)



Dilwyn Jones 




___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


[Ql-Users] Hard directories

2010-11-28 Thread Tony Firshman
Is there any automated way to copy files *and* hard directories without 
manually using MAKE_DIR?


Presumably WCOPY will only copy the files and not the directories.
Can MAKE_DIR be used after copying?

I am restoring my BBS from backup.

Tony
--
QBBS (QL fido BBS 2:257/67) +44(0)1442-828255
   t...@firshman.co.uk http://firshman.co.uk
Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman
TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] A small machine code program...

2010-11-28 Thread gdgqler

On 28 Nov 2010, at 14:51, Laurence Reeves wrote:

 Tony Firshman wrote:
 Marcel Kilgus wrote, on 26/Nov/10 17:02 | Nov26:
 Marcel Kilgus wrote:
 1for i=1to 100
 2a$=:if i mod 3=0:a$=FIZZ
 3if i mod 5=0:a$=a$BUZZ
 4print i,a$:next i
 
 (91 bytes including 4 LF)
 
 Damn, missed something:
 
 1for i=1to 100
 2a$=:if i mod 3=0:a$=FIZZ
 3if i mod 5=0:a$=a$BUZZ
 4print i,a$:next
 
 (89 bytes including 4 LF)
 
 1i=i+1
 2a$=:if i mod 3=0:a$=FIZZ
 3if i mod 5=0:a$=a$BUZZ
 4print i,a$:goto 1
 
 82 bytes incl LF
 
 and CTRL SPACE after 100.
 
 This meets all Rich's requirements:
 --
 The rules are simple -
 write out the values 1 to 100 on screen
 If the value is divisible by 3 write 'FIZZ' after the number
 If the value is divisible by 5 write 'BUZZ' after the number
 If the value is divisible by 3 and 5 write 'FIZZBUZZ' after the number
 --
 Nothing about having to stop at 100 (8-)#
 
 Tony
 
 1PRINT CHR$(RND(TO 255)):GO TO 1
 
 (It might take a little while...)
 

RND(TO 255) doesn't work for me. Try RND(4 TO 90) - only one character more: 
and it works!

George
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] A small machine code program...

2010-11-28 Thread Marcel Kilgus
Laurence Reeves wrote:
 1PRINT CHR$(RND(TO 255)):GO TO 1

Great thought in the spirit of Tony's cheating :-)

But there's always room for optimizations:

1REP:BPUT RND(90)

Will probably also need a few thousand years less! :-)

Marcel

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] QL on 2 monitors

2010-11-28 Thread Tony Firshman

Dilwyn Jones wrote, on 28/Nov/10 12:37 | Nov28:

Does anyone know if any (or all!) of the QL emulators can work on the
second screen of a two-monitor PC setup? My PC can only handle a single
monitor, so although I have QPC, QemuLator and QL2K on this PC, I can't
test them.

I think that what you have to do is drag the application to the edge of
the screen when 2 monitors/2 desktops/wide desktop are in use and they
will 'snap' onto the second screen, though it's a long time since I used
a 2 screen setup.

It's a Quanta helpline request from a member who says this would
influence his choice of which QL emulator he uses on his Windows PC. He
said it'd be handy to leave all his PC applications running on one
monitor and the QL by itself on the other, don't know why (unless he
just doesn't want to get caught using a QL at work by being able to turn
off monitor 2 if his boss approaches or something!!!)


Qemulator works fine in second screen under XP in VMware on a Macbook.

... and it does not *snap* - it can overlap both windows, as do all 
other programs.  I often use this feature to see very long lines of code 
in terminal windows which cannot line wrap.


Tony

--
QBBS (QL fido BBS 2:257/67) +44(0)1442-828255
   t...@firshman.co.uk http://firshman.co.uk
Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman
TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] A small machine code program...

2010-11-28 Thread Tony Firshman

Marcel Kilgus wrote, on 28/Nov/10 16:02 | Nov28:

Laurence Reeves wrote:

1PRINT CHR$(RND(TO 255)):GO TO 1


Great thought in the spirit of Tony's cheating :-)

But there's always room for optimizations:

1REP:BPUT RND(90)

Will probably also need a few thousand years less! :-)


He he - infinite number of monkeys spring to mind.
Would the complete works of Shakespeare arrive first though.

Tony

--
QBBS (QL fido BBS 2:257/67) +44(0)1442-828255
   t...@firshman.co.uk http://firshman.co.uk
Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman
TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Hard directories

2010-11-28 Thread Dilwyn Jones


- Original Message - 
From: Tony Firshman t...@firshman.co.uk

To: ql-users ql-us...@q-v-d.com
Sent: Sunday, November 28, 2010 3:44 PM
Subject: [Ql-Users] Hard directories




Is there any automated way to copy files *and* hard directories 
without manually using MAKE_DIR?


Presumably WCOPY will only copy the files and not the directories.
Can MAKE_DIR be used after copying?

I am restoring my BBS from backup.

Tony
I'm assuming that the backups are not compressed or packed together 
into an archive of some form...that is, they are a straight copy of 
the original BBS files as they were on your hard disk.


If so, try my The Copier program. If the backups are in the same 
sub-directory names as they came from, it might be able to do what you 
want. If it doesn't quite do what you want I can send you the sources 
to tweak it for yourself if you want (although I T-H-I-N-K the source 
BASIC is already in there).


http://www.dilwyn.me.uk/files/copier.zip

On the same page, there's an Adrian Ives package (called dirtools???) 
which might also be of help.


I also have a simple program I think was published in QL Today for 
doing this in a very basic way, which might be eaier to rewrite. Let 
me know if you'd liek a copy of that too, I don't think it's on my 
website unless it's in one the ARTICLES pages, or possibly in the HD 
Utils package on the same page as the Copier. 
http://www.dilwyn.me.uk/files/hdutils.zip


Dilwyn Jones


--
QBBS (QL fido BBS 2:257/67) +44(0)1442-828255
   t...@firshman.co.uk http://firshman.co.uk
Voice: +44(0)1442-828254 Fax: +44(0)1442-828255 Skype: tonyfirshman
TF Services, 29 Longfield Road, TRING, Herts, HP23 4DG
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm



-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1170 / Virus Database: 426/3285 - Release Date: 
11/28/10






___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] QL on 2 monitors

2010-11-28 Thread Dilwyn Jones

Dilwyn Jones wrote, on 28/Nov/10 12:37 | Nov28:
Does anyone know if any (or all!) of the QL emulators can work on 
the
second screen of a two-monitor PC setup? My PC can only handle a 
single
monitor, so although I have QPC, QemuLator and QL2K on this PC, I 
can't

test them.

I think that what you have to do is drag the application to the 
edge of
the screen when 2 monitors/2 desktops/wide desktop are in use and 
they
will 'snap' onto the second screen, though it's a long time since I 
used

a 2 screen setup.

It's a Quanta helpline request from a member who says this would
influence his choice of which QL emulator he uses on his Windows 
PC. He

said it'd be handy to leave all his PC applications running on one
monitor and the QL by itself on the other, don't know why (unless 
he
just doesn't want to get caught using a QL at work by being able to 
turn

off monitor 2 if his boss approaches or something!!!)

Qemulator works fine in second screen under XP in VMware on a 
Macbook.


... and it does not *snap* - it can overlap both windows, as do all 
other programs.  I often use this feature to see very long lines of 
code in terminal windows which cannot line wrap.


Tony
Ah, thanks for that. I couldn't remember whether or not things 
'snapped' from one ot the other or just moved continuously, 
overlapping both. It's so long since I last used 2 monitor systems! 
I'll pass the info on, thanks everyone.


Dilwyn Jones 




___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Q-emuLator

2010-11-28 Thread Tobias Fröschle

Am 28.11.2010 16:44, schrieb Dilwyn Jones:

Um, a question from me this time...

Anyone know if Q-emuLator can print to a printer on a USB port? As far 
as I can see it seems to be only possible to print to a parallel LPT 
port on the PC, or in some cases a serial port printer if using the 
emulation mode.



Dilwyn,
if it doesn't, that's exactly what Marcel's QPCPrint was intended for - 
It's in no way tied to QPC and can, with some twiddling, create an LPT 
on PCs without one.


Cheers,
Tobias
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Hard directories

2010-11-28 Thread Dave Walker

 -Original Message-
 From: ql-users-boun...@lists.q-v-d.com [mailto:ql-users-
 boun...@lists.q-v-d.com] On Behalf Of Tobias Fröschle
 Sent: 28 November 2010 17:47
 To: ql-us...@q-v-d.com
 Subject: Re: [Ql-Users] Hard directories
 
 Am 28.11.2010 16:44, schrieb Tony Firshman:
  Is there any automated way to copy files *and* hard directories
  without manually using MAKE_DIR?
 
  Presumably WCOPY will only copy the files and not the directories.
  Can MAKE_DIR be used after copying?
 
  I am restoring my BBS from backup.
 
  Tony
 Tony,
 no, not out of the box. TK2's WCOPY was built long before the advent of
 real directories.
 If I remember right, there's a directory tree copy routine coming with
 SMSQ/E source codes, and I guess Dilwyn's site has quite a number of
 tools that do the same thing.
 
 Cheers,
 Tobias
 ___
 QL-Users Mailing List
 http://www.q-v-d.demon.co.uk/smsqe.htm

The 'cp' copy command that comes with c68 can copy everything including hard
directories. I used to sue it regularily to copy a complete hard disk
partition contents to another one including the directory structure.

Dave Walker

Tel:  +44 (0)1707 652791
Mob: +44 (0)7999 218953
Web: http://www.itimpi.com
Skype:  itimpi

___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Q-emuLator

2010-11-28 Thread Dilwyn Jones

Am 28.11.2010 16:44, schrieb Dilwyn Jones:

Um, a question from me this time...

Anyone know if Q-emuLator can print to a printer on a USB port? As 
far as I can see it seems to be only possible to print to a 
parallel LPT port on the PC, or in some cases a serial port printer 
if using the emulation mode.



Dilwyn,
if it doesn't, that's exactly what Marcel's QPCPrint was intended 
for - It's in no way tied to QPC and can, with some twiddling, 
create an LPT on PCs without one.


Cheers,
Tobias
Yes, I am already able to print to the USB port from QPC2, luckily 
this is a Epson Stylus Color 880 which has a control code set so I 
don't even need QPCprint, on QPC2 luckily.


I needed to run something on a QDOS system (i.e. QemuLator) which 
wouldn't run on SMSQ/E on QPC2. As I had never printed from this 
QemuLator (it's version 3 BTW) I don't know how to persuade it to 
print via a USB port to a printer which understands Epson control 
codes.


This printer has both a parallel and USB connection. In the past I 
have had the USB port wired to the PC and the parallel port wired to 
the Super Gold Card PAR port at the same time so the same printer 
could be shared by my Aurora and PC at the same time. Well, not at the 
same time, total confusion reigned if both computers tried to print at 
the same time. As long as I was careful not to start printing on one 
before the other had finished it seemed to work. I don't think it'd be 
advisable to connect the printer to both ports on the PC at the same 
time though. Anyway, I'd have to crawl behind this desk, untie the 
cables and find a parallel port lead just for one use I guess (and I 
ain't built to crawl into tight spaces anyway!)


Dilwyn Jones 




___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Hard directories

2010-11-28 Thread Dilwyn Jones
The 'cp' copy command that comes with c68 can copy everything 
including hard

directories. I used to sue it regularily


Why did you sue it? Did it go disastrously wrong or something?

:o)))

Dilwyn Jones 




___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Q-emuLator

2010-11-28 Thread Tobias Fröschle

Am 28.11.2010 19:10, schrieb Dilwyn Jones:

Am 28.11.2010 16:44, schrieb Dilwyn Jones:

Um, a question from me this time...

Anyone know if Q-emuLator can print to a printer on a USB port? As 
far as I can see it seems to be only possible to print to a parallel 
LPT port on the PC, or in some cases a serial port printer if using 
the emulation mode.



Dilwyn,
if it doesn't, that's exactly what Marcel's QPCPrint was intended for 
- It's in no way tied to QPC and can, with some twiddling, create an 
LPT on PCs without one.


Cheers,
Tobias


I needed to run something on a QDOS system (i.e. QemuLator) which 
wouldn't run on SMSQ/E on QPC2. As I had never printed from this 
QemuLator (it's version 3 BTW) I don't know how to persuade it to 
print via a USB port to a printer which understands Epson control codes.



Dilwyn,
get out from under your desk, keep that printer connected to USB, get 
yourself a comfy place somewhere and read the QPCPrint Manual, especialy 
the chapter Installing QPCPrint as a virtual printer. This talks about 
a technique how you can have hour USB printer emulate an LPT: printer. 
It installs a new LPTx: (i.e. without hardware), whatever you send there 
is then filtered through QPCPrint and sent to the USB printer. I think 
that's exactly what you're looking for.


Cheers,
Tobias
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Q-emuLator

2010-11-28 Thread Dilwyn Jones
I needed to run something on a QDOS system (i.e. QemuLator) which 
wouldn't run on SMSQ/E on QPC2. As I had never printed from this 
QemuLator (it's version 3 BTW) I don't know how to persuade it to 
print via a USB port to a printer which understands Epson control 
codes.



Dilwyn,
get out from under your desk,

I can't, I'm stuck in an endless tangle of zip-tied cables :-)

keep that printer connected to USB, get yourself a comfy place 
somewhere and read the QPCPrint Manual, especialy the chapter 
Installing QPCPrint as a virtual printer. This talks about a 
technique how you can have hour USB printer emulate an LPT: printer. 
It installs a new LPTx: (i.e. without hardware), whatever you send 
there is then filtered through QPCPrint and sent to the USB printer. 
I think that's exactly what you're looking for.


Cheers,
Tobias
Except (1) I never needed QPCprint with QPC, so (2) I never bought it, 
so (3) I don't have it!


QPC printing works fine for me without QpcPrint. I want to see if 
QemuLator to do the same thing!


Dilwyn Jones 




___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Q-emuLator

2010-11-28 Thread Tobias Fröschle

Am 28.11.2010 20:04, schrieb Dilwyn Jones:
I needed to run something on a QDOS system (i.e. QemuLator) which 
wouldn't run on SMSQ/E on QPC2. As I had never printed from this 
QemuLator (it's version 3 BTW) I don't know how to persuade it to 
print via a USB port to a printer which understands Epson control 
codes.



Dilwyn,
get out from under your desk,

I can't, I'm stuck in an endless tangle of zip-tied cables :-)

keep that printer connected to USB, get yourself a comfy place 
somewhere and read the QPCPrint Manual, especialy the chapter 
Installing QPCPrint as a virtual printer. This talks about a 
technique how you can have hour USB printer emulate an LPT: printer. 
It installs a new LPTx: (i.e. without hardware), whatever you send 
there is then filtered through QPCPrint and sent to the USB printer. 
I think that's exactly what you're looking for.


Cheers,
Tobias
Except (1) I never needed QPCprint with QPC, so (2) I never bought it, 
so (3) I don't have it!


Ahh, got it. I somehow was under the impression that nowadays everyone 
would need/have QPCPrint.

Definitely a serious omission from your software library.
QPC printing works fine for me without QpcPrint. I want to see if 
QemuLator to do the same thing!
What you could try (After you managed to entangle yourself from under 
the desk) :

Export your USB printer as network printer.
Go to a terminal session and redirect LPT3 (or whatever your first 
unavailable LPT: is to that network enabled printer with

net use LPT3: \\yourcomputername\usbprintername
Voila, you've got your USB printer on LPT

Cheers,
Tobias
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Hard directories

2010-11-28 Thread Norman Dunbar
If you use WinBack to create a backup, there was a (useful) utility
which took a snapshot of the directory structure, built a new SuperBasic
file (called Make_directory_bas I think) and you would run this first
against a new disk prior to a restore.

It made life easier as the restore would put the files back into the
correct location, as opposed to having all the files live in the top
level directory and then make_dir everything afterwards. That way of
doing it resulted in huge piles of holes in the directory structure
and doing DIR WIN1_ would result in quite a substantial delay as the DIR
code skipped over all the holes.

Of course, if you didn't use WinBack's utility to build the tree, then
you are slightly stuffed I'm afraid. :-(


Cheers,
Norman.

-- 
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] A small machine code program...

2010-11-28 Thread Norman Dunbar
On 27/11/10 17:53, Tobias Fröschle wrote:

 Puts() needs #includestdio.h  or at least defining correctly!
 It should, for the sake of art, but doesn't need to.
Hmm. Not declaring a function, even one returning int (the default
return type) is listed in my book of common C mistakes.

 Main() always returns int.
 Main always takes two parameters int and char **.
 It should, to generate anything maintainable, but doesn't need to. C
 allows you to ignore return values.
I know it allows me to do so, but just because I can do something
doesn't mean that I should! ;-)

Seriously, I agree. But the fact that main() is not returning a value is
not the same as ignoring one, because it's the OS that should get the
return from main() not some other part of the C program itself - which
happily lets you, as you say, ignore return values.

 I can do even better (alas, not on the QL - And: I'll probably never get
 employment as a Java programmer):
Neither will I I'm afraid, I loathe and detest Java with a vengeance!
Too many problems at work caused by too many [bloody] java programmers
(I use the term loosely) who reinvent the bloody wheel in java every
single program they ever write.

Sometimes I despair!

I wonder how the fizzbuzz  program would be written using quantum
computing - which knows all the answers before you even ask the question!


Cheers,
Norman.

-- 
Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
Pudsey
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767
___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm


Re: [Ql-Users] Q-emuLator

2010-11-28 Thread Dilwyn Jones
Great - thanks Rich. It never occurred to me that QPCprint could be 
used with anything other than QPC2!


(Oops sorry Tony, just realised too late I've top-posted)

Dilwyn Jones

- Original Message - 
From: Rich Mellor r...@rwapservices.co.uk

To: ql-us...@q-v-d.com
Sent: Sunday, November 28, 2010 8:28 PM
Subject: Re: [Ql-Users] Q-emuLator



QPC works because it allows you to set any PC port as the port seen by 
the

PAR command on the QL emulator.

So far as I know, there is no such option in q-emulator, although this 
is

something I have never had to look for.

QPCPrint can be used to capture the output from any QL emulator, or 
other
program running on the PC - it does this by setting up a virtual 
printer

driver which captures the LPT1 port and then uses the Windows printer
processor to send the output to any connected printer.  Printfil is
something similar - both programs are detailed with links on
www.rwapsoftware.co.uk/Printers2.html as an option for emulator users.

The other option is to investigate other options for capturing the 
LPT1 port

and redirecting output - a good guide appears at:
http://geekswithblogs.net/dtotzke/articles/26204.aspx

Read this in conjunction with the step by step guide on the QPCPrint 
site if

you want more details - http://www.kilgus.net/qpcprint/printer.html

There are others out there also - DOS2USB for example (I have never 
tried
this) - but no free solutions unless you follow the examples listed 
above


Rich
www.rwapsoftware.co.uk




___
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm