Motorola 68k Memory System: Ram vs Rom - ram

I have to fill in the blanks for a 2 4mb RAM chip and 2 64kb ROM chip. I don't understand how to do it. Any type of input on it would help.
| Starting Address (Binary) | Starting Add. (Hex)| Ending Add. (Hex)|
4mb RAM1 | 0000 0000 0000 0000 0000 0000 | 00 00 00 | |
4mb RAM2 | | | |
-------------------------------------------------------------------------------------
64kbROM1 | 1010 0000 0000 0000 0000 0000 | A0 00 00 | |
64kbROM2 | | | |
I think that for RAM 1 the ending address is FF FF FF. But I do not know where to start with the next starting binary address.

OK - this is really just simple arithmetic with hex and binary. I'll get you started - see if you can fill in the rest...
| Starting Address (Binary) | Starting Add. (Hex)| Ending Add. (Hex)|
4MB RAM1 | 0000 0000 0000 0000 0000 0000 | 00 00 00 | 3F FF FF |
4MB RAM2 | 0100 0000 0000 0000 0000 0000 | 40 00 00 | |
------------------------------------------------------------------------------------
64kB ROM1 | 1010 0000 0000 0000 0000 0000 | A0 00 00 | |
64kB ROM2 | | | |
A useful quantity to remember is 1 MB == 100000 in hexadecimal.
Also note that the unit for byte is B (upper case), mega is M (upper case) and kilo is k (lower case). So it's kB for kilobytes, and MB for megabytes. If you think this is pedantic then note that lower case m means "milli", which is 1/1000th of a unit - I doubt that your system has 4 millibyte RAM modules!

Related

How to set column width?

I'm using the react-native-markdown-display to display the following table:
## Männer:
| Alter | 18 - 25 | 26 - 35 | 36 - 45 | 46 - 55 | 56 - 65 | 65+ |
| --------------------- | ------- | ------- | ------- | ------- | ------- | ------- |
| Athlet | 49 - 55 | 49 - 54 | 50 - 56 | 50 - 57 | 51 - 56 | 50 - 55 |
| Exzellent | 56 - 61 | 55 - 61 | 57 - 62 | 58 - 63 | 57 - 61 | 56 - 61 |
| Gut | 62 - 65 | 62 - 65 | 63 - 66 | 64 - 67 | 62 - 67 | 62 - 65 |
| überdurchschnittlich | 66 - 69 | 66 - 70 | 67 - 70 | 68 - 71 | 68 - 71 | 66 - 69 |
| Durchschnitt | 70 - 73 | 71 - 74 | 71 - 75 | 72 - 76 | 72 - 75 | 70 - 73 |
| Unterdurchschnittlich | 74 - 81 | 75 - 81 | 76 - 82 | 77 - 83 | 76 - 81 | 74 - 79 |
| Schlecht | 82+ | 82+ | 83+ | 84+ | 82+ | 80+ |
inside this scrollview:
<ScrollView contentInsetAdjustmentBehavior="automatic" style={styles.scrollView}>
<ScrollView horizontal={true}>
<Markdown style={styles}>{content}</Markdown>
</ScrollView>
</ScrollView>
What I want to achieve is a table with no line breaks inside an horizontal and vertical scrolling. What I get is a table, where each cell has its own width. How can I achieve that each cell inside a column has the same width, without a style?
EDIT:
I just found out, that i has something to do with the width of the inner ScrollView. After doing the following:
<ScrollView contentInsetAdjustmentBehavior="automatic" style={styles.scrollView}>
<ScrollView horizontal={true} contentInsetAdjustmentBehavior="automatic">
<View style={{width: 1200}}>
<Markdown style={styles}>{content}</Markdown>
</View>
</ScrollView>
</ScrollView>
i works quite good. But now all tables have the same width and i want to display different tables each having a diffrent width

TTF - reading glyph data

I'm working on implementing true type fonts in my program but there is a huge problem interpreting some data to the correct values from the glyph table.
I'm working with the windows specification (Link: https://www.microsoft.com/typography/otspec/glyf.html)
and in addition the apple specification (Link:
https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6glyf.html)
And in order to check the values I'm using this page:
(Link: https://opentype.js.org/glyph-inspector.html)
The font that I'm using is the raleway font - medium
(Link: https://www.fontsquirrel.com/fonts/raleway)
I can see that the values of numberOfContours, xMin, yMin, xMax, yMax and endpContour[0] are correct so far. I don't know about the instructionLength[0].
The example below is not the general code but the bytecode for the entry that I need to interpret correctly. The problem is that I can't get my head around the next values to fill. (instructionLength, flags...)
The character that is represented below is the acute. It is made of 4 points.
The expected result of the 4 points from that only one contour are:
p0: x=106, y=609
p1: x=48, y=629
p2: x=106, y=730
p3: x=194, y=730
additional information:
advanceWidth: 232
leftSideBearing: 48
(source: https://opentype.js.org/glyph-inspector.html)
In sum the arcute consists out of 50 bytes.
1. 0 | -> 0000 0000 | -> 1 | -> 0000 0000 0000 0001 | (ind. 0) <- numberOfContours
2. 1 | -> 0000 0001 | ^
3. 0 | -> 0000 0000 | -> 48 | -> 0000 0000 0011 0000 | (ind. 1) <- xMin
4. 48 | -> 0011 0000 | ^
5. 2 | -> 0000 0010 | -> 609 | -> 0000 0010 0110 0001 | (ind. 2) <- yMin
6. 97 | -> 0110 0001 | ^
7. 0 | -> 0000 0000 | -> 609 | -> 0000 0000 1100 0010 | (ind. 3) <- xMax
8. 194 | -> 1100 0010 | ^
9. 2 | -> 0000 0010 | -> 730 | -> 0000 0010 1101 1010 | (ind. 4) <- yMax
10. 218 | -> 1101 1010 | ^
11. 0 | -> 0000 0000 | -> 3 | -> 0000 0000 0000 0011 | (ind. 5) <- endpContour[0]
12. 3 | -> 0000 0011 | ^
13. 0 | -> 0000 0000 | -> 23 | -> 0000 0000 0001 0111 | (ind. 6) <- instructionLength[0]
14. 23 | -> 0001 0111
15. 177 | -> 1011 0001
16. 6 | -> 0000 0110
17. 100 | -> 0110 0100
18. 68 | -> 0100 0100
19. 64 | -> 0100 0000
20. 12 | -> 0000 1100
21. 1 | -> 0000 0001
22. 1 | -> 0000 0001
23. 0 | -> 0000 0000
24. 71 | -> 0100 0111
25. 0 | -> 0000 0000
26. 0 | -> 0000 0000
27. 0 | -> 0000 0000
28. 116 | -> 0111 0100
29. 18 | -> 0001 0010
30. 1 | -> 0000 0001
31. 9 | -> 0000 1001
32. 21 | -> 0001 0101
33. 43 | -> 0010 1011
34. 177 | -> 1011 0001
35. 6 | -> 0000 0110
36. 0 | -> 0000 0000
37. 68 | -> 0100 0100
38. 19 | -> 0001 0011
39. 39 | -> 0010 0111
40. 55 | -> 0011 0111
41. 51 | -> 0011 0011
42. 106 | -> 0110 1010
43. 58 | -> 0011 1010
44. 58 | -> 0011 1010
45. 88 | -> 0101 1000
46. 2 | -> 0000 0010
47. 97 | -> 0110 0001
48. 20 | -> 0001 0100
49. 101 | -> 0110 0101
50. 0 | -> 0000 0000
I need to know from you how the get the instructionLegths and it's values correct and what it is used for (couldn't find something about that in the docs.) the flags and the points I mentioned above.
Thank you in advance!

writing an sql query to display specific charges

I am writing an sql query to display names of guests who have incurred both athletic and dinner charges on their itinerary. Can someone point me in the right direction as to setting up the query?
this is what i have but gives no result..
SELECT GUEST.FIRSTNAME, CHARGETYPE.DESCRIPTION
FROM GUEST, CHARGES, CHARGETYPE
WHERE CHARGETYPE.CHARGEID = CHARGES.CHARGEID
AND CHARGES.CHARGEID = '07'
AND CHARGES.CHARGEID = '03'
the chargeid 07 and 03 reflect athletic and dinner charges respectfully. im sorry for the lack of info, first time really using stackoverflow.
Here is the CHARGETYPE table
CHARGEID and DESCRIPTION are the column names
01 ROOM DEPOSIT
02 LUNCH SERVICE
03 DINNER SERVICE
04 BREAKFAST SERVICE
05 ROOM CHARGE
06 GIFTSHOP PURCHASE
07 ATHLETIC CHARGE
CHARGEID, ITINID, CHARGETIME, AMOUNT, GUESTID are the columns for the CHARGES table
01 001 11:00 -1850001
02 001 14:00 30 0001
03 001 18:00 55 0001
04 001 11:00 20 0001
05 001 20:00 20 0001
08 001 12:00 20 0001
01 002 16:00 -185 0002
02 002 16:30 40 0002
04 002 10:00 20 0002
05 002 14:00 25 0002
09 002 15:00 25 0002
01 003 10:00 -185 0003
02 003 12:00 30 0003
03 003 18:00 50 0003
04 003 11:00 18 0003
05 003 12:30 27 0003
06 003 14:45 30 0003
01 004 11:00 -185 0004
02 004 13:00 40 0004
03 004 19:00 60 0004
04 004 11:00 15 0004
05 004 20:00 34 0004
01 005 10:00 -185 0005
02 005 12:00 30 0005
03 005 17:00 30 0005
04 005 10:00 10 0005
05 005 16:00 25 0005
01 006 11:00 -185 0001
02 006 12:00 22 0001
03 006 18:00 40 0001
04 006 08:00 15 0001
05 006 20:00 60 0001
07 006 14:00 50 0001
01 007 11:00 -185 0003
02 007 12:00 20 0003
03 007 17:00 55 0003
04 007 10:00 15 0003
05 007 16:00 45 0003
01 008 11:00 -185 0005
02 008 13:00 20 0005
03 008 18:00 60 0005
04 008 09:00 20 0005
05 008 22:00 65 0005
07 008 12:00 50 0005
.
GUESTID LASTNAME FIRSTNAME are the columns for the GUEST table
0001 SMITH JOHN
0002 SMITH LISA
0003 ADAMS PETER
0004 ADAMS JANE
0005 JOHNSON DEAN
SELECT G.FIRSTNAME,G.LASTNAME, CT.DESCRIPTION
FROM GUEST G
INNER JOIN CHARGETYPE CT
ON G.GUESTID = C.GUESTID
INNER JOIN CHARGES
ON CT.CHARGEID = C.CHARGEID
WHERE C.CHARGEID IN ('07','03' );

Replicate a string names x times and ascribe replication number

I would like to replicate key names x number of times and have a separate column to indicate the replication number, e.g. let's say I have three key names as follows:
101
102
103
So, I would like each of the above numbers (names) replicated 3 times and to have a separate identifier number equal to 4 characters. It would therefore look like this:
101 0001
101 0002
101 0003
102 0001
102 0002
102 0003
103 0001
103 0002
103 0003
I guess this could be genered with a relatively straight forward awk script? *Edit: I would like to not specify the names to replicate in the script - it should be "replicate all names in this text file", as there are a lot of them (~400) and all with variable name types.
Thank you in advance!
In bash
echo {101,102,103}" "{01,02,03}
101 01 101 02 101 03 102 01 102 02 102 03 103 01 103 02 103 03
Following Fedorqui's advice for newlines
printf "%s\n" {101,102,103}" "{01,02,03}
101 01
101 02
101 03
102 01
102 02
102 03
103 01
103 02
103 03
Using the awk -v flag to pass a variable number which is the number of repeats for each line, and sprint to format the number into 2 decimal places with zero padding:
awk -v number_repeats=3 '{
for(i=0; i<number_repeats; i++) {
print $0, sprintf("%02d", i+1)
}
}'
If you don't mind GNU Parallel
parallel -k 'printf "%02d %02d\n"' ::: {6..12} ::: 1 2 3
06 01
06 02
06 03
07 01
07 02
07 03
08 01
08 02
08 03
09 01
09 02
09 03
10 01
10 02
10 03
11 01
11 02
11 03
12 01
12 02
12 03
Or, if your keys are in a file, called keys like this
32
45
78
You can read the file
parallel -k 'printf "%02d %02d\n" {1} {2}' :::: keys ::: 1 2 3
32 01
32 02
32 03
45 01
45 02
45 03
78 01
78 02
78 03

tftp PUT fail with TFTPD32 (atftp, and tftp works)

I configure tftpd on my embedded system with command:
# udpsvd -E 0 69 tftpd -c /flash0/app/Binary/
Everything works fine when I use linux apps (tftp, atftp) as clients.
But with windows tool (TFTPD32 by Ph.Jounin) - preffered in company I can't PUT file into server.
Correct trace (few lines):
# sending 4 bytes
00 04 00 00
received 516 bytes: 0003 0001
sending 4 bytes
00 04 00 01
received 516 bytes: 0003 0002
sending 4 bytes
00 04 00 02
received 516 bytes: 0003 0003
sending 4 bytes
Error trace :
# sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
sending 10 bytes
00 06 74 73 69 7a 65 00 30 00
received 516 bytes: 0003 0001
tftpd: timeout
tftpd: malformed packet
tftpd: malformed packet
OK. It is tftp implementation dependand question.
I use one from ddwrt/busybox distro.
I needed to disable FEATURE_TFTP_BLOCKSIZE, and avoid tftp_get_option("blksize"...).