For my understanding I wish to compare some knowledge from the C64 with a modern Intel/AMD Linux PC. I don't have much knowledge about the C64 anymore, but some notes at hand.
Is there a difference for Intel/AMD Linux PCs for IRQs and NMIs? In other words, for the C64's 6502 CPU there were two commands, SEI and CLI. The SEI command did disable IRQs. IIRC IRQs were interrupts for all hardware and programs, excepted if a program called the SEI command. IIRC just the restore and reset buttons did cause a NMI, an interrupt that can't be disabled, but that isn't done by an interval automatically. So, if you did real time MIDI programming you call SEI to disable all interrupts, so that just the currently needed MIDI rout was allowed to run, there were no IRQs anymore. For example you directly asked the UART connected to the bus if there was a byte: ## see [1] easier to read for C64 Assembler coders Load register_with_the_information_if_there_is_a_byte_for an_MIDI_event_to_a_'memory'_register LSR #to check if the flag is set Branch back_to_load_register_until_the_flag_isn't_cleared_or_as_long_it's_set Load MIDI_event_byte_from_data_register_to_a_'memory'_register ## For this loop IRQs for other programs were allowed, e.g. to ask information from the QWERTY keyboard. Then you go on: ## [2] SEI # to disable IRQs, now the following rout has 100% rt priority # some code to process data CLI # to enable IRQs ## This would be hard real time. While the 6502 has got 3, what I called here 'memory' registers, a, x and y (I guess a is an own register, some days ago I thought it was for the stack) an AMD might have much more of those registers and instead of load and store loops there might be a move command. The parallel port of our PCs seems to have a relativ directly connection to the PCs main bus, just for 8 bits (1 byte, but 32 or 64 bits, but we only need those 8 bits for MIDI), perhaps it's easy to connect a 64 MIDInterface to the parallel port, perhaps just some TTLs are needed, perhaps I'm a little bit too naiv. So if there should be a way to disable and enable interrupts for Intel/AMD too, it should be possible to do the same kind of programming as for the C64. IIUC for Intel/AMD IRQs aren't IRQs, but NMIs?! Cheers! Ralf [1] I once did a MIDI extension for SpeechBasic to program a real time MIDI sound sampler on BASIC $1810 LDA $DEO6 $1813 LSR $1814 BCC $1810 $1816 LDA $DE07; read MIDI event byte, usually followed by RTS [2] $181A SEI; disable IRQs ;the MIDI program $183C CLI; enable IRQs, usually followed by RTS _______________________________________________ 64studio-devel mailing list 64studio-devel@lists.64studio.com http://lists.64studio.com/mailman/listinfo/64studio-devel