Jump to content

dmsc

Members
  • Content Count

    760
  • Joined

  • Last visited

  • Days Won

    1

dmsc last won the day on July 14 2017

dmsc had the most liked content!

Community Reputation

1,265 Excellent

5 Followers

About dmsc

  • Rank
    Dragonstomper

Profile Information

  • Gender
    Male
  • Location
    Viña del Mar, Chile

Recent Profile Visitors

8,474 profile views
  1. Hi! Well, I still plan to do some additions before releasing the final 4.4 version. It was really hard to squeeze the new functionality and keep the IDE bellow 8kB, but I already added a few more optimizations and fixed one little bug, so now the integer IDE is 8155 bytes, I still have 37 bytes available 😛 I think that now, the main functionality missing in the editor is a "go to specific line", or other means to move around the file faster - this is needed as the scroll speed is low using the standard Atari screen handler. Also, I'm not convinced the keys I selected for the copy operations are good, currently is "CONTROL-M" for "mark" a position as source, and then "CONTROL-C" to copy from the marked position to the current position. I accept suggestions! Have Fun!
  2. Hi all! I have a new beta (test) version of the next FastBasic release (4.4), I need your help testing the IDE - specially the editor, as it has many changes under the hood to make it smaller. The changes in this version are: - Adds BREAK key handling to the IDE - this was long overdue, now you can press BREAK key to return to the IDE from your program. - Adds COPY/PASTE to the editor, you need to press CONTROL-M to "mark" a line in the editor, then when you press CONTROL-C that line is copied after the current one. Pressing CONTROL-C multiple times copies multiple lines. Changes to the language: - Adds "CLR" statement, that un-dimension arrays and sets all variables to 0. Changes to the cross-compiler: - Allows to compile to code that can be put in a cartridge - by removing all uses of self-modifying-code and adding a stub to copy the zeropage interpreter from ROM to RAM at startup. - Allows accessing to DATA's from external assembly files. - The CC65 tools are included in the distribution, you don't need to install CC65 to use the cross-compiler anymore. Have Fun! fastbasic-v4.4-beta-macosx.zip fastbasic-v4.4-beta-win32.zip fastbasic-v4.4-beta.atr fastbasic-v4.4-beta-linux64.zip
  3. Hi! No problem, glad I could help. Fortunately there is google translate to understand the code comments Have Fun!
  4. Hi! Sorry, not yet. It is in my TODO list, I experimented with a few ways to suspend execution that won't slow down the interpreter - currently I have a solution that only adds 46 bytes to the IDE. It definitely will be included in the next releas! Have Fun!
  5. Hi! Trying to assemble different versions of the Altirra Kernel, I discovered that Mad Assembler does not always generate the correct bytes for all floating points values. Tracking the bug, it came from the different floating-point precision of the generated code, FreePascal uses different approximations for some of the operations than the Delphi compiler, producing different results. I rewrote the floating-point parsing code, using a simpler and more accurate algorithm that does not rely on converting a floating point into a string. Attached is the resulting pascal source. Have Fun! mads.pas
  6. Hi! Done, see at https://github.com/dmsc/fastbasic/blob/master/manual.md#console-print-and-input-statements Have Fun!
  7. Hi! Yes, I tried to group statements by use, so I separated the PRINT and INPUT to the console from the "PRINT #" and "INPUT #". Do you think that adding a note "See the Device Input and Output Statements section for the PRINT # usage" (and the same at the INPUT) would work? Or perhaps "For the PRINT with I/O channel (PRINT #), see the Device Input and Output Statements section bellow" ? Thanks!
  8. Hi! This program: GR. 16+1 ? #6, "#" POS. 1, 1: ? #6,"HOLA" POS. 2, 2: ? #6,"chao" REPEAT UNTIL KEY() Produces this output: There is a little incompatibility between FastBasic and Atari BASIC: in Fastbasic you always put a comma after the I/O channel, instead of the ";" in Atari BASIC, so the following are equivalent: Atari BASIC: ? #6,"A" : ? #6;"A" FastBasic: ? #6,,"A" : ? #6,"A" The reason for the incompatibility is because I tough the Atari BASIC syntax was not very logical (as it is different than other I/O channel specs), and in the first versions also it was shorter to implement. Have Fun!
  9. Hi! Note that, as it is used from BASIC, you can assume that all compatible math-packs must have that entry point, so you are free to also use it. It is only one byte less than the two "STA", but if each byte counts.... Have Fun!
  10. Hi! IMHO, code is shorter if you do the standard "high-bit-is-end" in the commands, this working code is 122 bytes, including the command input: LDBUFA = $DA51 SKPSPC = $DBA1 CIX = $F2 INBUFF = $F3 ICCOM = $342 ICBAL = $344 ICPTL = $346 ICBLL = $348 CIOV = $E456 ; Here you put your command codes - should be < 128 COMMAND_CD = $31 COMMAND_COPY = $32 COMMAND_DIR = $33 COMMAND_DEL = $34 COMMAND_LOAD = $35 COMMAND_LOCK = $36 COMMAND_MKDIR = $37 COMMAND_RMDIR = $38 COMMAND_UNLOCK = $39 input: ldx #0 lda #$05 sta ICBAL+1 stx ICBLL+1 sta ICCOM lda #$80 sta ICBAL sta ICBLL jsr CIOV bmi ret_error parse: ldy #0 sty CIX jsr LDBUFA ; Skip WS jsr SKPSPC ; Compare words next_char: lda (INBUFF), y and #$7F eor command, x iny asl beq char_ok ; Skip to next command next_command: lda command, x asl inx bcc next_command ldy CIX cpx #command_size char_ok: inx bcc next_char ; Check that the command has an argument sty CIX lda (INBUFF), y bmi ret cmp #' ' bne ret_error ; Skip WS end end jmp SKPSPC ret_error: ldx #command_size+1 ret: rts command: .byte 'C', 'D'+128, COMMAND_CD .byte 'C', 'O', 'P', 'Y'+128, COMMAND_COPY .byte 'D', 'I', 'R'+128, COMMAND_DIR .byte 'D', 'E', 'L'+128, COMMAND_DEL .byte 'L', 'O', 'A', 'D'+128, COMMAND_LOAD .byte 'L', 'O', 'C', 'K'+128, COMMAND_LOCK .byte 'M', 'K', 'D', 'I', 'R'+128, COMMAND_MKDIR .byte 'R', 'M', 'D', 'I', 'R'+128, COMMAND_RMDIR .byte 'U', 'N', 'L', 'C', 'K'+128, COMMAND_UNLOCK command_size = * - command - 1 .byte $FF To use, you call "input" and then "lda command,x" to read the command code: jsr input lda command,x bmi show_error ; Now process the command in A Now, I think that it would be better to simply parse the full command line in the ESP32, just add a SIO command "execute shell command", and then in the Atari you simply input the line and send the full line over SIO. That way you can add commands, show better errors (just receive the full result string over SIO), etc. Have Fun!
  11. Hi! You are right. So there is a window of 4 cycles (for the "LDA PORTA" instruction) where the interrupt will be lost. This implies you can't use the PIA interrupts reliably, a higher level handshake with the device should be implemented to avoid loosing data. Have Fun!
  12. Hi! The solution is simpler than that: you have to always read PORTA with interrupts enabled. This means that the interrupt won't be lost even if it came exactly in the same cycle as the CPU is reading the PORTA register, as the datasheet (for the motorola 6820, this has interrupt timing diagrams) says that the interrupt line will be asserted for up to 1.6us after the PIA access ends, so IRQ would be low when the CPU fetches the next instruction. I suspect that still there would be a possibility of lost interrupt if an NMI came just after writing the PORTA register, but before servicing the IRQ, but that should be rare. Overall, the interrupt logic in the PIA is not good, it should have had a separate flag to clear the interrupt. Have Fun!
  13. Hi! You are using a ",", this is the "TAB" you are seeing. Correct syntax is: ? #1;"My Text" Have Fun! Edit: Sorry, did not see that this was already answered! I'm late reading the forum 😛
  14. Hi! Not anymore, starting at 3.20, See: Have Fun!
  15. Hi! Well, here in Viña there are still a couple of open shops with Arduinos in stock 😛 But I found it strange that you managed to burn two Arduinos simply connecting the 5V to any input. And if you connected the 5V to GND, you could have blown a fuse or the regulator, so a repair could be simple. Well, the circuit can be very simple: Have Fun!
×
×
  • Create New...