Home » Personal collection » Acorn DFS disks » dfs_box03_disk13_bcpl_calc.scp » EXCLFLB
EXCLFLB
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn DFS disks » dfs_box03_disk13_bcpl_calc.scp |
Filename: | EXCLFLB |
Read OK: | ✔ |
File size: | 031A bytes |
Load address: | FF2A9E |
Exec address: | 20007 |
File contents
SECTION "EXCLFLB" // Floating/fixed point calculator - floating point specific routines. // The calculation procedures used are // copyright Richards Computer Products Ltd. (C) 1983 // Written by C Jobson 19/04/83 // Contains DISPHDNG & DISPNUM. GET "LIBHDR" GET "FPHDR" GET "EXCLHDR" // DISPHDNG is called to display a heading at the cursor position and // a list of the keys used on rows 18 and 19. LET DISPHDNG() BE $( WRITES(" BCPL FLOATING POINT CALCULATOR") CURSOR(1, 18) WRITES("0-9 E . + - ** / RETURN DELETE exit") CURSOR(1, 19) WRITES(" ; : = X") $) // DISPNUM is called to display a number. ERR is an error code - it // is ignored here. AND DISPNUM(NUM, ERR) BE WRITESG(NUM, NUMWIDTH, 11)
00000000 53 45 43 54 49 4f 4e 20 22 45 58 43 4c 46 4c 42 |SECTION "EXCLFLB| 00000010 22 0d 0a 0d 0a 2f 2f 20 46 6c 6f 61 74 69 6e 67 |"....// Floating| 00000020 2f 66 69 78 65 64 20 70 6f 69 6e 74 20 63 61 6c |/fixed point cal| 00000030 63 75 6c 61 74 6f 72 20 2d 20 66 6c 6f 61 74 69 |culator - floati| 00000040 6e 67 20 70 6f 69 6e 74 20 73 70 65 63 69 66 69 |ng point specifi| 00000050 63 20 72 6f 75 74 69 6e 65 73 2e 0d 0a 2f 2f 20 |c routines...// | 00000060 54 68 65 20 63 61 6c 63 75 6c 61 74 69 6f 6e 20 |The calculation | 00000070 70 72 6f 63 65 64 75 72 65 73 20 75 73 65 64 20 |procedures used | 00000080 61 72 65 0d 0a 2f 2f 20 63 6f 70 79 72 69 67 68 |are..// copyrigh| 00000090 74 20 52 69 63 68 61 72 64 73 20 43 6f 6d 70 75 |t Richards Compu| 000000a0 74 65 72 20 50 72 6f 64 75 63 74 73 20 4c 74 64 |ter Products Ltd| 000000b0 2e 20 28 43 29 20 31 39 38 33 0d 0a 2f 2f 20 57 |. (C) 1983..// W| 000000c0 72 69 74 74 65 6e 20 62 79 20 43 20 4a 6f 62 73 |ritten by C Jobs| 000000d0 6f 6e 20 20 31 39 2f 30 34 2f 38 33 0d 0a 0d 0a |on 19/04/83....| 000000e0 2f 2f 20 43 6f 6e 74 61 69 6e 73 20 44 49 53 50 |// Contains DISP| 000000f0 48 44 4e 47 20 26 20 44 49 53 50 4e 55 4d 2e 0d |HDNG & DISPNUM..| 00000100 0a 0d 0a 47 45 54 20 22 4c 49 42 48 44 52 22 0d |...GET "LIBHDR".| 00000110 0a 47 45 54 20 22 46 50 48 44 52 22 0d 0a 47 45 |.GET "FPHDR"..GE| 00000120 54 20 22 45 58 43 4c 48 44 52 22 0d 0a 0d 0a 0d |T "EXCLHDR".....| 00000130 0a 2f 2f 20 44 49 53 50 48 44 4e 47 20 69 73 20 |.// DISPHDNG is | 00000140 63 61 6c 6c 65 64 20 74 6f 20 64 69 73 70 6c 61 |called to displa| 00000150 79 20 61 20 68 65 61 64 69 6e 67 20 61 74 20 74 |y a heading at t| 00000160 68 65 20 63 75 72 73 6f 72 20 70 6f 73 69 74 69 |he cursor positi| 00000170 6f 6e 20 61 6e 64 0d 0a 2f 2f 20 61 20 6c 69 73 |on and..// a lis| 00000180 74 20 6f 66 20 74 68 65 20 6b 65 79 73 20 75 73 |t of the keys us| 00000190 65 64 20 6f 6e 20 72 6f 77 73 20 31 38 20 61 6e |ed on rows 18 an| 000001a0 64 20 31 39 2e 0d 0a 0d 0a 4c 45 54 20 44 49 53 |d 19.....LET DIS| 000001b0 50 48 44 4e 47 28 29 20 42 45 0d 0a 24 28 20 57 |PHDNG() BE..$( W| 000001c0 52 49 54 45 53 28 22 20 42 43 50 4c 20 20 46 4c |RITES(" BCPL FL| 000001d0 4f 41 54 49 4e 47 20 20 50 4f 49 4e 54 20 20 43 |OATING POINT C| 000001e0 41 4c 43 55 4c 41 54 4f 52 22 29 0d 0a 20 20 20 |ALCULATOR").. | 000001f0 43 55 52 53 4f 52 28 31 2c 20 31 38 29 0d 0a 20 |CURSOR(1, 18).. | 00000200 20 20 57 52 49 54 45 53 28 22 30 2d 39 20 45 20 | WRITES("0-9 E | 00000210 2e 20 20 2b 20 2d 20 2a 2a 20 2f 20 20 52 45 54 |. + - ** / RET| 00000220 55 52 4e 20 20 44 45 4c 45 54 45 20 20 65 78 69 |URN DELETE exi| 00000230 74 22 29 0d 0a 20 20 20 43 55 52 53 4f 52 28 31 |t").. CURSOR(1| 00000240 2c 20 31 39 29 0d 0a 20 20 20 57 52 49 54 45 53 |, 19).. WRITES| 00000250 28 22 20 20 20 20 20 20 20 20 20 3b 20 20 20 3a |(" ; :| 00000260 20 20 20 20 20 20 3d 20 20 20 20 20 20 20 20 20 | = | 00000270 20 20 20 20 20 58 22 29 0d 0a 24 29 0d 0a 0d 0a | X")..$)....| 00000280 0d 0a 2f 2f 20 44 49 53 50 4e 55 4d 20 69 73 20 |..// DISPNUM is | 00000290 63 61 6c 6c 65 64 20 74 6f 20 64 69 73 70 6c 61 |called to displa| 000002a0 79 20 61 20 6e 75 6d 62 65 72 2e 20 20 45 52 52 |y a number. ERR| 000002b0 20 69 73 20 61 6e 20 65 72 72 6f 72 20 63 6f 64 | is an error cod| 000002c0 65 20 2d 20 69 74 0d 0a 2f 2f 20 69 73 20 69 67 |e - it..// is ig| 000002d0 6e 6f 72 65 64 20 68 65 72 65 2e 0d 0a 0d 0a 41 |nored here.....A| 000002e0 4e 44 20 44 49 53 50 4e 55 4d 28 4e 55 4d 2c 20 |ND DISPNUM(NUM, | 000002f0 45 52 52 29 20 42 45 0d 0a 20 20 20 57 52 49 54 |ERR) BE.. WRIT| 00000300 45 53 47 28 4e 55 4d 2c 20 4e 55 4d 57 49 44 54 |ESG(NUM, NUMWIDT| 00000310 48 2c 20 31 31 29 0d 0a 0d 0a |H, 11)....| 0000031a