New answers tagged

3

If you want to print a string (terminated with a NUL (000)) suggest the following: string: .asciz "the quick brown ..." mov #1000,sp ; init stack mov #string,R0 ; pass string as argument jsr pc,Print ; to Print function ... Print:mov r1,-(sp) ; save R1 br 20$ ; jump to NUL test 10$: ...


3

Is this example equivalent to "skip on not zero accumulator"? Yes. It's the same idea as skips on the PDP-8, as explained in this Q&A: Without the I bit, you "or" the conditions, and skip if at least one of the conditions is true. With the I bit, you negate the final result, which (using de Morgan's rule) is equivalent to an "...


1

If the normal instruction is "Skip on X, do not skip on not-X" then if setting bit 5 resulted only in "do not skip on X, do not skip on not-X", it would not be very useful. Therefore we can probably assume the effect of setting bit 5 is to get you "do not skip on X, skip on not-X". This is guesswork based on a consideration of ...


12

The 1955 manual for the IBM 704 on page 7 talks about data representation in the computer. When a word is interpreted as numerical data, the zero position acts as the sign of the word. (…) When a logical operation is performed on a word, the word is interpreted as a 32-bit signless number. As an algebraic (signed) binary number, a word can represent (…) In ...


6

(Another "what was the first" question where it's basically impossible to answer it unless one goes through all computer instruction sets ...) One example of the usage of "logical" is the IBM 7090 (1959), as one can verify in the manual where the shift instructions are listed starting on page 31: ALS Accumulator Left Shift ARS ...


2

Extending on @kindall's answer, here's some sample code to deal with that problem: - jsr $bf00 op_c7 !byte $c7 !word c7_parms ldx $300 bne + lda $bf30 sta c5_parms+1 jsr $bf00 !byte $c5 !word c5_parms lda $301 and #$0f tax inx stx $300 lda #$2f sta $301 ...


7

Unlike the current directory on modern operating systems, ProDOS's "prefix" can be empty, and when it is, you have to specify the full path to files you want to work with. It actually is empty at boot (well, after BASIC.System starts). It was a common practice to detect an empty prefix at startup and get the volume name of the last accessed disk ...


0

Error $40 means $40 Invalid pathname syntax. The pathname contains illegal characters. So it might be helpful to see what names are used. Programmers comming from a DOS environment often add unnecessary slashes The ProDOS 8 Technical Reference Manual says at page 53 SET_PREFIX: When ProDOS is started up, the system prefix is set to the name of the volume ...


11

You can't repeat arbitrary instructions with rep. In asm syntax, rep just means to include an F3 byte as a prefix for this instruction. There is no implication that it actually means repeat, it's just shorthand for db 0xF3. Assemblers exist to help you put the bytes you want into an object file. It's up to you to make good choices. When F3 rep doesn't ...


31

All of them. But it will only have an effect with a select few. Contrary to what the question implies, the rep prefix is not an orthogonal looping construct that can be combined with any instruction. The 8086 family manual defines the use of rep/repe/repz (0xf3) and repne/repnz (0xf2) prefixes only in conjunction with string instructions, which are movs, ...


-1

[You might want to add a bit more information to start with - like what assembler you're using, or what kind of 'Error thrown' you expect. From assembler? Linker? Debugger? Or some OS/Runtime? Otherwise it's hard to give any definite answer.] In general REP is simply an opcode that can come at any point like any other opcode. It isn't invalid on its own. ...


Top 50 recent answers are included