Welcome, Guest. Please login or register.


Recent Posts

Pages: 1 2 3 4 [5] 6 7 8 9 10
41
BASIC / BASIC program beíró feladatok?
« Last post by Kapitany on Yesterday at 10:59 »
Sziasztok!

Van esetleg valamilyen vagány, látványos, maximum 10-20 sorból álló BASIC programotok, amit rendezvényen a laikusokkal be lehet gépeltetni, hogy örüljenek?

Ilyesmire gondoltam, mint ez a Speccy BASIC program:
[ Guests cannot view attachments ]

Vagy esetleg ezt átportolni IS BASIC-re? Összegyűjthetnénk pár ilyen progit! :)

K.
42
BASIC / Re: QUIZ motor
« Last post by Kapitany on Yesterday at 10:46 »
Ez valami bug.
CLEAR SCREEN után írjál valamit a képernyőre (pl: PRINT ; ), hogy a SET INK-nek hatása legen. Én a SET PALETTE utasításban a színek sorrendjének megadásakor figyelembe veszem, hogy az első kiírás INK 1 tintaszínnel történjen.

Amúgy ha kipróbálod, nem csak az első PRINT megy rossz színnel, hanem az összes többi is a következő SET INK-ig. Bal felső sarokba a kérdés sorszáma, utána a kérdés, majd a válaszok is...
43
BASIC / Re: QUIZ motor
« Last post by Kapitany on Yesterday at 10:27 »
Köszi, akkor megnézem #102-re írással! :) Fogtam egy BUGOT! :D
44
BASIC / Re: QUIZ motor
« Last post by Zozosoft on Yesterday at 09:37 »
Itt valami EDITOR-VIDEO bug lehet.
Amúgy TEXT 40-ben is csinálja.

Ha SET INK után a #102-re írunk, akkor jó, csak akkor van bug, ha az írás sima PRINT-tel az EDITOR-ba megy.
45
BASIC / Re: QUIZ motor
« Last post by Lacika on Yesterday at 09:03 »
Ez valami bug.
CLEAR SCREEN után írjál valamit a képernyőre (pl: PRINT ; ), hogy a SET INK-nek hatása legen. Én a SET PALETTE utasításban a színek sorrendjének megadásakor figyelembe veszem, hogy az első kiírás INK 1 tintaszínnel történjen.
46
BASIC / QUIZ motor
« Last post by Kapitany on Yesterday at 08:45 »
Sziasztok!

Elkezdtem írni egy QUIZ motort EP-re BASIC-ben a szombati Regamexhez az EP standhoz, lehessen EP-n quizeztetni az embereket, és egy érdekes dologgal találkoztam, valamit benézek szerintem, edukáljatok meg légyszi!

A program 137. sorában beállítom a TEXT 80-at, és a 140-es sorban a palettát hozzá. (A 223-as szín az egy ilyen pasztell bézs szín.)

Ezek után amikor eljut a program a WRITE_QUESTION eljáráshoz, a képernyő letörlésre kerül a 2020. sorban, a 2022. sorban beállítom elvileg a tintát a 3-as palettaszínre (ződ), ám ennek ellenére a kiírás mégis az 1-es palettaszínnel történik! Mért?

A későbbiekben amikor váltogatom a tintaszínt, minden rendben van, a megfelelő tintaszínnel ír a program, viszont a képernyő törlése utáni INK parancsot mintha figyelmen kívül hagyná. Ötlet? :)

Mivel nem nagy az egész program, bemásolom ide szövegként, hogy érthetőbb legyen miről beszélek, de csatolom futtatható formában is:

Code: [Select]
  100 PROGRAM QUIZ
  110 LET Q=0:LET SCORE=0
  120 NUMERIC POINTS(5),RIGHT,ANSWER,POS(5)
  130 STRING QUESTION$,ANSWER$(5)
  135 LET POS(1)=14:LET POS(2)=16:LET POS(3)=18:LET POS(4)=20
  136 !SET VIDEO MODE 2
  137 TEXT 80
  140 SET #102:PALETTE BLACK,223,BLACK,GREEN,BLACK,GREEN,BLACK,RED
  150 SET #102:BIAS 24
  199 !
  200 CALL START
  210 DO
  220   CALL READ_QUESTION
  230   IF QUESTION$="" THEN
  240     EXIT DO
  250   END IF
  260   CALL WRITE_QUESTION
  270   CALL GET_ANSWER
  280   CALL EVAL_ANSWER
  300 LOOP
  998 END
  999 !
 1000 DEF START
 1110   LET Q=0:LET SCORE=0
 1120   RESTORE
 1490 END DEF
 1499 !
 1500 DEF READ_QUESTION
 1510   READ QUESTION$
 1520   IF QUESTION$="" THEN
 1530     EXIT DEF
 1540   END IF
 1550   FOR I=1 TO 4
 1560     READ ANSWER$(I),POINTS(I)
 1570     IF POINTS(I)<>0 THEN
 1580       LET RIGHT=I
 1590     END IF
 1600   NEXT I
 1610 END DEF
 1999 !
 2000 DEF WRITE_QUESTION
 2010   LET Q=Q+1
 2020   CLEAR SCREEN
 2022   SET #102:INK 3
 2025   PRINT Q;".";
 2027   PRINT AT 24,1:"PONT:";SCORE;
 2030   PRINT AT 9,10:QUESTION$
 2050   FOR I=1 TO 4
 2060     CALL PRINT_ANSWER(I)
 2070   NEXT I
 2080   PRINT :PRINT :PRINT "Nyomd meg a vlasz sorszmt!";
 2090 END DEF
 2299 !
 2300 DEF PRINT_ANSWER(INDEX)
 2310   PRINT AT POS(INDEX),1:TAB(6);INDEX;")   ";ANSWER$(INDEX);
 2350 END DEF
 2999 !
 3000 DEF GET_ANSWER
 3030   DO
 3040     LET KEY$=INKEY$
 3060   LOOP UNTIL KEY$="1" OR KEY$="2" OR KEY$="3" OR KEY$="4"
 3070   LET ANSWER=VAL(KEY$)
 3090 END DEF
 3499 !
 3500 DEF EVAL_ANSWER
 3510   SET #102:INK 5
 3520   CALL PRINT_ANSWER(RIGHT)
 3522   IF ANSWER=RIGHT THEN
 3524     PRINT AT 24,34:"HELYES V‘LASZ!";
 3526   END IF
 3530   IF ANSWER<>RIGHT THEN
 3540     SET #102:INK 7
 3550     CALL PRINT_ANSWER(ANSWER)
 3560     PRINT AT 24,32:"HELYTELEN V‘LASZ!";
 3570   END IF
 3580   LET SCORE=SCORE+POINTS(ANSWER)
 3590   SET #102:INK 1
 3600   PRINT AT 24,1:"PONT:";SCORE;
 3610   DO
 3620   LOOP WHILE INKEY$=""
 3990 END DEF
 8000 ! DATA ROWS
 8010 DATA "Hogy h„vjk Mario din† bartjt?"
 8020 DATA "Pumukli",0,"Luigi",0,"Yoshi",3,"Gumbi",0
 8030 DATA "Hogy h„vjk a Legend of Zelda sorozat kardos fˆhˆs“t?"
 8040 DATA "Xenia",0,"Link",2,"Zelda",0,"Ax Battler",0
 8050 DATA ""

47
Programming / Re: EXOS, EXDOS, ISDOS confusion
« Last post by Wysardry on Yesterday at 05:40 »
So, if I understand you correctly, as far as compiler targets go the terms "Enterprise" and "EXOS" would essentially be the same thing and "EXDOS" would be used for disk-based machines and inherit properties from Enterprise/EXOS?

After browsing the plat directory of the ACK source code it seems to me that both generic and specific platforms are defined with the latter inheriting information from the former.

For example, there are "msdos", "msdos386" and "msdos86" directories.

CPU information is stored in the mach directory of the source.

You can also mix and match certain platforms and CPUs to allow compilation for both Z80 and 8080 versions of CP/M, for example.

As ACK is able to compile multiple programming languages for multiple targets, it only supports text-based console/terminal programs AFAIK. If graphics and/or sound are needed, adding the Enterprise as a target for TRSE or ugBASIC would be a better option.

If I'm successful with ACK, most likely I will be looking at adding Enterprise support to FreePascal next.
48
Programming / Re: EXOS, EXDOS, ISDOS confusion
« Last post by Zozosoft on 2024.April.24. 12:04:56 »
EXOS is the heart of the Enterprise. It provides all neccessary functions for application programs, and has a powerful expansions system. All expansions handled by EXOS are transparent for the application programs.

For example, the game which uses proper EXOS function calls to load their files, can be run from tape, floppy, hard disk, SD card, Commodore floppy drive, FTP server on internet, PC hard drive via ep128emu, etc.
The game doesn't need to be changed, it doesn't need to know which storage is used on the current Enterprise configuration. It just asks EXOS to load file, and EXOS does the work with their installed expansions.

Another important function of EXOS is the EXOS file module system. Some types are handled by internally the EXOS, others by expansion (and you can define new types for your new expansions).
Most important is the 05h type, the New Application Program, it is a machine code executable program, loaded and started at 100h.
Moreover, the machine code programs on Enterprise don't need a Basic loader which is needed on many-many other 8 bit machines!
If you lose the Basic cartridge, you can still enjoy games, they can be loaded from the WP. (Except the Basic ones :oops: )

EXDOS is an expansion ROM for EXOS, adding disk functions. It adds DISK: device to the EXOS system, which will be the default file device.
EXDOS commands (DIR, CD, etc) can be accessed via standard EXOS command functions, then can be used by any programs from any enviroment.
It has an own ROM entry points for direct access disk functions (FISH and DISKIO), these are used by ISDOS and disk utilities. General programs games, demos, stc don't need to use it.
EXDOS also has an own expansion system, the IDE hard disk card, and SD card driver are expansion ROM for EXDOS. These are low level driver for the drives (LBA sector access), all filesystem functions are still handled by EXDOS.

ISDOS is an applicaton program (05h header type), originally loaded from disk, but it exists as a built in ROM version, which is copy from ROM and start it.
It is a translation bridge between CP/M programs and EXOS&EXDOS.
It doesn't run CP/M itself, don't use any code from CP/M! It provides the standard CP/M entry points (and also lots of MSX-DOS) for the programs, and translates these to Enterprise enviroment. Keyboard, display, printer passed to EXOS devices, file and disk functions to EXDOS.

For a compiler I think the EXOS will be the most important and primary option!
(Negative example: I was happy because CP/M Turbo Pascal can be used on the Enterprise, but hated it becaues it can't compile real Enterprise programs. Compiled programs still need obsolated CP/M enviroment, which can be used only with disk.)

I think new compiler target are easy writing new games and demos to Enterprise, these will be needed to run any machine, including stock machine with only tape.
Soo implementing all EXOS functions will be enough for beginning and for the most of programs. Later can be added as expansion special EXDOS/ISDOS functions.

Good idea to add functions units wich similar to BASIC enviroment, open same VIDEO, KEYBOARD, SOUND channels. And implement the similar PRINT, INPUT, SOUND, PLOT, SET INK, SET PALETTE, SET CHARACTER, etc instructions. (These use EXOS function calls, and generate Escape sequences for the EXOS devices)
Then the BASIC programmers can easily move to the new compiler system.

Later, direct graphics and sound routines will be necessary for advanced users.
49
Programming / Re: EXOS, EXDOS, ISDOS confusion
« Last post by Wysardry on 2024.April.24. 09:19:42 »
I was thinking about allowing the compiled program to load and save from tape or disk.

The way ACK seems to be set up, you specify the OS and the processer you want to compile for on the command line, and it uses the appropriate libraries.

I'm not sure at this point if one library can include code from another library (so that the EXDOS library could reuse code from the EXOS library).
50
Programming / Re: EXOS, EXDOS, ISDOS confusion
« Last post by geco on 2024.April.24. 09:08:42 »
Would separate libraries be needed for EXOS and EXDOS, depending on whether you were using tape or disk storage?
Only for loading, and saving files you do not need, EXOS handles this, and route to the default "device", if you have EXDOS, than EXDOS is the default, in basic EP config TAPE is the default.
Pages: 1 2 3 4 [5] 6 7 8 9 10