Problem Statement
Write a SIC/XE program a program to copy a character string to another char string
Solution
Line Number | Code | Comments |
1 | LDA #5 | |
2 | STA ALPHA | |
3 | LDA #90 | |
4 | STCH C1 | |
5 | ALPHA |
Write a SIC/XE program a program to copy a character string to another char string
Line Number | Code | Comments |
1 | LDA #5 | |
2 | STA ALPHA | |
3 | LDA #90 | |
4 | STCH C1 | |
5 | ALPHA |
System Software – Given the target address generated for the following machine instruction
(i) 032600h
(ii) 03C300h
(iii) 0310C303h
if(B)=006000,(PC)=003000, (X)=00090.
(i)032600=103000
(ii)03C300=00C303
(iii)0310C303=003030…
Write a subroutine for SIC/XE that will read a record into a buffer. The record may be any length from 1 to 100 bytes. The end of record is marked with a “null” character (ASCII code 00). The …
Write a subroutine for SIC that will read a record into a buffer. The record may be any length from 1 to 100 bytes. The end of record is marked with a “null” character (ASCII code 00). The …
Suppose that RECORD contains a 100-byte record. Write a subroutine for SIC that will write this record on to device 05.
Line Number | Code | Comment |
1 | JSUB WRREC | |
2 | WRREC LDX ZERO | |
3 | WLOOP TD |
Assume that ALPHA is an array of 100 words. Write a sequence of instructions for SIC/XE to find the maximum element in the array and store results in MAX.
Line Number | Code | Comment |
LDS #3 |
Assume that ALPHA and BETA are the two arrays of 100 words. Another array of GAMMA elements are obtained by multiplying the corresponding ALPHA element by 4 and adding the corresponding BETA elements.
Line Number | Code | Comments |
Suppose that ALPHA is an array of 100 words. Write a sequence of instruction for SIC/XE to arrange the 100 words in ascending order and store result in an array BETA of 100 elements.
Line Number | Code |
Assume that ALPHA is an array of 100 words. Write a sequence of instructions for SIC/XE to set all 100 elements of the array to 0. Use immediate addressing and register-to-register instructions to make the process as efficient …
Write a sequence of instructions for SIC/XE to set ALPHA=GAMMA*BETA-9 using register operation.
Line Number(ac) | Code | Description |
1 | LDA GAMMA | |
2 | MUL BETA | |
3 | SUB 9 | |
4 | STA ALPHA |