Jump to content

Willsy

Members
  • Content Count

    3,144
  • Joined

  • Last visited

Everything posted by Willsy

  1. Here it is... atariage.com/forums/topic/186520-assembly-rnd-routine/page__pid__2367705#entry2367705 I used the 'compact routine' - I think tursi may have developed it - can't remember now!
  2. TurboForth v1.1 has the word RND which performs much better (as far as I know - seems fine for things like screen locations etc) you give it a limit and it returns a number. I stole the code from someone here - might have been Afamantyr. There's a thread somewhere on this board on this exact subject!
  3. Where do we send the money? Paypal? Thanks - this looks great!
  4. Yeah, that's a lovely site. Stuart also has tons of info on the 990 mini's. He's a fellow Brit, too
  5. I'd suggest you upload the video to YouTube. Flickr is good for photo's and doesn't invade your computer, and your friends and families' computers
  6. Thirded. Facebook is a virus.
  7. I just wanted to say how much I enjoyed meeting you all at the Faire! Now safely back home, somewhat tired after my whirlwind Transatlantic jaunt! I'll be uploading YouTube vids later today - I'll post them here. Also, I've joined Twitter. You can find me on #ForthFreak if you want to connect Mark
  8. For ideas, have a look at the ZX81 16K Ram Pack:
  9. Anyone know what the current status is with this? Thanks
  10. Are you using this on a real TI? Perhaps the disk is full? ZIP your files before uploading, then you should be okay!
  11. Willsy

    Chicago

    Of course, I'll be dressed as the Queen, so you'll recognise me instantly! (Failing that, I'll be sporting a TurboForth shirt!)
  12. No problem! There is also an *excellent* article on GPLLNK, specifically relating to XB in the May 1984 edition of The Smart Programmer. See attached. This is probably better than the previous article that I posted. HTH Mark sp8405.zip
  13. You didn't specify a vlaid filename for the output file. Your input file (DSK1.1028N) is fine. But DSK is not a legal output filename. You need to specify the output filename. Like this: DSK1.TEST Or something like. Then it will create a converted version of your program (I presume) which you will find on your disk number 1 with the filename TEST Hope this helps.
  14. Willsy

    Chicago

    He he! How will we recognise each other? It'll have to be something inconspicuous - like a wearing a console on our head or something!
  15. Rich, The tagged-object loader in the XB cart is a 'reduced functionality' version of the EA tagged object loader. Unfortunately, it doesn't support the REF tag, so it cannot resolve REFd addresses in your assembler source code. It does support the DEF directive (necessary for CALL LINK) which means your only choice is to give the address yourself, which of course means that you need to know it first, in order to specify it as a DEF directive in your source code! Unfortunately Guillame, I do not know the address of GPLLNK in the XB environment, but if you check out the July 1986 edition of the Smart Programmer, you will find a version of GPLLNK listed that you can use. It's not a very large program (70 bytes) and is fully compatible with MiniMem, EA, XB etc. I have posted the magazine below. You need the paper port viewer to view the file, which you can download (free) from here: ftp://ftp.scansoft.c...ort/setupex.exe You may also have the same trouble with XMLLNK. You will want to use XMLLNK if you want to do any floating point math. For XMLLNK you can use the following code, which should work just fine. GPLLNK BSS 32 * workspace for gpllnk DATA LNKGPL * address of code LNKGPL MOV *R11+,@>83E2 * move XML opcode to GPLs R1 MOV @>83F6,R0 * save GPLs R11 LWPI >83E0 * load GPL workspace MOV R1,R2 * copy opcode SRL R1,12 * get table number SLA R1,1 * convert to word offset SLA R2,4 * remove table number from copy SRL R2,11 * get the index into the table A @>0CFA(R1),R2 * get address of pointer MOV *R2,R2 * get address of code from pointer BL *R2 * branch to the code LWPI GPLLNK * restore our workspace MOV R0,@>83F6 * restore GPLs R11 RTWP Hope this helps. Mark sp8607.zip
  16. Yes this is a known. I think it was Tursi that managed to get a special build of the assembler from the author with the bug fixed (thanks Tursi) I have attached the debugged version. To my knowledge the Win994A project is dead. Mark WinAsm99.zip
  17. That would work for me! It would remain compatible with the TI, and would have the benefit of improving the performance of all software that used disk a lot. For example, the Editor Assembler system would get an instant boost.
  18. Indeed, and I completely understand that view point. Before you know it, you've kind of 'forked' the TI-99/4A into something else that only exists in emu land. Mark
  19. I think the code can be better factored ('factoring' is organising your code into logical units that each do a section of job of at hand, and *only* that section of the job). For example, you are checking the keys twice. Take the left key as an example: You check it in LCHK and you also check it in TEST. That is inefficient. If you moved the call to LCHK inside of the IF block in TEST, then LCHK wouldn't need to test is the S key was pressed at all, since LCHK would only ever be called if the key was pressed! I mean from this (in TEST) LCHK DUP 83 = IF DROP PX 0 > IF -1 +TO PX THEN ELSE to this: DUP 83 = LCHK IF DROP PX 0 > IF -1 +TO PX THEN ELSE Now, LCHK doesn't need to know anything about which key was pressed, since it's principle job is to check if the screen position to it's left is vacant. You have 're-factored' LCHK. Consequently, the DUPs and IFs in LCJK related to detecting a left key-press can be removed - they're redundant. Here is how I would approach your 'problem' in TurboForth. I think it is quite nicely factored and almost reads like English. Just paste it directly into Classic99 (if you're running Firefox, otherwise paste it into Notepad then from there copy and paste it into Classic99). Type MAIN_LOOP to run it. Press FCTN 4 to quit. 0 VALUE PX \ player x coordinate 0 VALUE PY \ player y coordinate CHAR E CONSTANT KEY_UP CHAR S CONSTANT KEY_LEFT CHAR D CONSTANT KEY_RIGHT CHAR X CONSTANT KEY_DOWN 32 CONSTANT BLANK \ code for empty space 42 CONSTANT PLAYER \ player character code 2 CONSTANT FCTN4 \ key code for fctn & 4 : ERASE_PLAYER PY PX BLANK 1 HCHAR ; : DRAW_PLAYER PY PX PLAYER 1 HCHAR ; : DO_LEFT ERASE_PLAYER -1 +TO PX DRAW_PLAYER ; : DO_RIGHT ERASE_PLAYER 1 +TO PX DRAW_PLAYER ; : DO_UP ERASE_PLAYER -1 +TO PY DRAW_PLAYER ; : DO_DOWN ERASE_PLAYER 1 +TO PY DRAW_PLAYER ; : LEFT? PX 0> IF PY PX 1- GCHAR BLANK = IF DO_LEFT THEN THEN ; : RIGHT? PX 39 < IF PY PX 1+ GCHAR BLANK = IF DO_RIGHT THEN THEN ; : UP? PY 0> IF PY 1- PX GCHAR BLANK = IF DO_UP THEN THEN ; : DOWN? PY 23 < IF PY 1+ PX GCHAR BLANK = IF DO_DOWN THEN THEN ; : MAIN_LOOP PAGE 12 1 45 38 HCHAR DRAW_PLAYER BEGIN KEY? DUP CASE KEY_UP OF UP? ENDOF KEY_DOWN OF DOWN? ENDOF KEY_LEFT OF LEFT? ENDOF KEY_RIGHT OF RIGHT? ENDOF ENDCASE FCTN4 = UNTIL ; It is possible to make this code smaller but I wanted to show something that was easy to understand and recognisable to most people . In particular, DO_LEFT, DO_RIGHT, DO_UP, and DO_DOWN could be replaced very simply with one generic routine. Hope the above helps.
  20. The only difficult thing I can think of is the evaluation of complex expressions: X=INT(A*RND(B))+COS©/(ATN(Z)*PI+(32*(T-3/RND(F))) You get the idea. You need to evaluate according to the order of precedence. You need stacks for that.
  21. TF is very different from TI Forth. Since TI Forth is still available, I don't see the point in porting TI Forth applications to it - just run them on TI Forth! There is a chap in the USA that is porting an AMS memory overlay system from TI Forth to TF, which will be very useful indeed. In general though, you'd just run TI Forth code on TI Forth, wouldn't you? Mark
  22. Thanks Lee. Well, the plot thickens... I found this in the ROM after single stepping: 0FAA STST 2 0FAC MOV R2,@>837C In other words, the GPL status byte is a copy of the 9900's status register. Well well... The EQ bit in the 9900 is bit 2, which just happens to be the COND bit in GPL parlence. So, you're spot on sir! Thank you. Another mystery solved. Mark
  23. Okay, the GPL status byte at >837C is giving me grief. Thy Hallowed Book of Truth sayeth that thy Holy GPL Byte of Holy Status be it assembled thusly: And lo, it was so. Yet hark, verily does thy Book Of Truth refer to an "equal bit" (FCOM, page 260): Where ist thou "equal bit"? [ or is the book referring to the eq bit in the 9900? If so, it's a bloody shambles! ]
  24. Willsy

    Chicago

    Eating?? You WOMAN! What's wrong with you?!! You don't need FOOD - you have the TI! :)
×
×
  • Create New...